[Suggestion] drivers/gpu/drm/ttm: let constant string match the output format in ttm_dma_page_alloc_debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello David Airlie:

   for the h[4] is "available" (which length is 9), at line 1107.
   but for seq_printf at line 1114, its format is %8s.

   I suggest to make them match with each other (although it is not a bug).

   thanks.


1103 int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data)
1104 {
1105         struct device_pools *p;
1106         struct dma_pool *pool = NULL;
1107         char *h[] = {"pool", "refills", "pages freed", "inuse", "available",
1108                      "name", "virt", "busaddr"};
1109 
1110         if (!_manager) {
1111                 seq_printf(m, "No pool allocator running.\n");
1112                 return 0;
1113         }
1114         seq_printf(m, "%13s %12s %13s %8s %8s %8s\n",
1115                    h[0], h[1], h[2], h[3], h[4], h[5]);
1116         mutex_lock(&_manager->lock);
1117         list_for_each_entry(p, &_manager->pools, pools) {
1118                 struct device *dev = p->dev;
1119                 if (!dev)
1120                         continue;
1121                 pool = p->pool;
1122                 seq_printf(m, "%13s %12ld %13ld %8d %8d %8s\n",
1123                                 pool->name, pool->nrefills,
1124                                 pool->nfrees, pool->npages_in_use,
1125                                 pool->npages_free,
1126                                 pool->dev_name);
1127         }
1128         mutex_unlock(&_manager->lock);
1129         return 0;
1130 }
1131 EXPORT_SYMBOL_GPL(ttm_dma_page_alloc_debugfs);



-- 
Chen Gang

Asianux Corporation
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux