All of lore.kernel.org
 help / color / mirror / Atom feed
* [Suggestion] drivers/gpu/drm/ttm:  let constant string match the output format in ttm_dma_page_alloc_debugfs
@ 2012-11-06  8:47 Chen Gang
  0 siblings, 0 replies; only message in thread
From: Chen Gang @ 2012-11-06  8:47 UTC (permalink / raw)
  To: airlied; +Cc: Chen Gang, dri-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-06  9:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06  8:47 [Suggestion] drivers/gpu/drm/ttm: let constant string match the output format in ttm_dma_page_alloc_debugfs Chen Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.