From: Chen Gang <gang.chen@asianux.com>
To: airlied@linux.ie
Cc: Chen Gang <gang.chen@asianux.com>, dri-devel@lists.freedesktop.org
Subject: [Suggestion] drivers/gpu/drm/ttm: let constant string match the output format in ttm_dma_page_alloc_debugfs
Date: Tue, 06 Nov 2012 16:47:00 +0800 [thread overview]
Message-ID: <5098CE84.2010709@asianux.com> (raw)
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
reply other threads:[~2012-11-06 9:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5098CE84.2010709@asianux.com \
--to=gang.chen@asianux.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.