From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang 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 Message-ID: <5098CE84.2010709@asianux.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from intranet.asianux.com (intranet.asianux.com [58.214.24.6]) by gabe.freedesktop.org (Postfix) with ESMTP id C6BBC9EE9A for ; Tue, 6 Nov 2012 01:18:50 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@linux.ie Cc: Chen Gang , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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