aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_tt.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-03-17 00:43:50 -0400
committerDave Airlie <airlied@redhat.com>2012-03-20 04:45:35 -0400
commit25d0479a5925562fbf999afb5a8daa3f501c729d (patch)
treefce09c17114af428b041eee88d43cf2bc50901a7 /drivers/gpu/drm/ttm/ttm_tt.c
parentf10487658a0e5fd793ee5ba7ad645c060e4afbcd (diff)
drm/ttm: Use pr_fmt and pr_<level>
Use the more current logging style. Add pr_fmt and remove the TTM_PFX uses. Coalesce formats and align arguments. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_tt.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 2f75d203a2bf..8aafeef40ca3 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -28,6 +28,8 @@
28 * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> 28 * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
29 */ 29 */
30 30
31#define pr_fmt(fmt) "[TTM] " fmt
32
31#include <linux/sched.h> 33#include <linux/sched.h>
32#include <linux/highmem.h> 34#include <linux/highmem.h>
33#include <linux/pagemap.h> 35#include <linux/pagemap.h>
@@ -196,7 +198,7 @@ int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev,
196 ttm_tt_alloc_page_directory(ttm); 198 ttm_tt_alloc_page_directory(ttm);
197 if (!ttm->pages) { 199 if (!ttm->pages) {
198 ttm_tt_destroy(ttm); 200 ttm_tt_destroy(ttm);
199 printk(KERN_ERR TTM_PFX "Failed allocating page table\n"); 201 pr_err("Failed allocating page table\n");
200 return -ENOMEM; 202 return -ENOMEM;
201 } 203 }
202 return 0; 204 return 0;
@@ -229,7 +231,7 @@ int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_bo_device *bdev,
229 ttm_dma_tt_alloc_page_directory(ttm_dma); 231 ttm_dma_tt_alloc_page_directory(ttm_dma);
230 if (!ttm->pages || !ttm_dma->dma_address) { 232 if (!ttm->pages || !ttm_dma->dma_address) {
231 ttm_tt_destroy(ttm); 233 ttm_tt_destroy(ttm);
232 printk(KERN_ERR TTM_PFX "Failed allocating page table\n"); 234 pr_err("Failed allocating page table\n");
233 return -ENOMEM; 235 return -ENOMEM;
234 } 236 }
235 return 0; 237 return 0;
@@ -347,7 +349,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
347 ttm->num_pages << PAGE_SHIFT, 349 ttm->num_pages << PAGE_SHIFT,
348 0); 350 0);
349 if (unlikely(IS_ERR(swap_storage))) { 351 if (unlikely(IS_ERR(swap_storage))) {
350 printk(KERN_ERR "Failed allocating swap storage.\n"); 352 pr_err("Failed allocating swap storage\n");
351 return PTR_ERR(swap_storage); 353 return PTR_ERR(swap_storage);
352 } 354 }
353 } else 355 } else