From patchwork Mon Feb 3 12:29:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 24040 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 00F5A202B2 for ; Mon, 3 Feb 2014 12:30:11 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id h16sf30617546oag.8 for ; Mon, 03 Feb 2014 04:30:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=BlB922n34NAC10SbIobq5a8iMzIklZvpnDIgxopuKHY=; b=RlVtVFDToexxBnJ1DMoi58cJKvN5dlQzUaXfeJ6LrpxC9NfVxpjZSJNNjmkyE/MpO4 yuK0M3Q03mY2PXr2PAY8jgIVYoNIsRk1l8yONGS+DCLKxqJUJ9CRE5+aZUV1z4FAvC0h 7SVhM+MTb22T1Klin+ZoWRPSnj3415JedDS6DT6tAY64MIcKcREi7CxwcD2gZvKenq+N q9FiBy9C98KFDBx+258ZmTWnaU9Uyl4iIx1h2WTFQrFcIKJWRqwd7jKAyBBDmlZQdwp0 53VW1VwLZb0PyOkzRCxRv9+I4v2QDHzwvX8T+bYSO1i7x24aHmlbmF0I/NT/8L3uz0fq D7kQ== X-Gm-Message-State: ALoCoQl++EODe7Hs0lqYomhu2GCBvcI2N1XLrbq6lZC/+zKXMfnfAWxoa0gho57zzaIMNEPJQaF8 X-Received: by 10.182.98.230 with SMTP id el6mr13728902obb.10.1391430610832; Mon, 03 Feb 2014 04:30:10 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.138 with SMTP id k10ls1869978qge.66.gmail; Mon, 03 Feb 2014 04:30:10 -0800 (PST) X-Received: by 10.220.29.200 with SMTP id r8mr28709045vcc.9.1391430610743; Mon, 03 Feb 2014 04:30:10 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id uo10si35472vec.94.2014.02.03.04.30.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 04:30:10 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id 11so4590543vbe.38 for ; Mon, 03 Feb 2014 04:30:10 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr4654146vcn.21.1391430610642; Mon, 03 Feb 2014 04:30:10 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp152707vcz; Mon, 3 Feb 2014 04:30:10 -0800 (PST) X-Received: by 10.68.162.131 with SMTP id ya3mr36818805pbb.102.1391430609547; Mon, 03 Feb 2014 04:30:09 -0800 (PST) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by mx.google.com with ESMTPS id i8si20431141pav.74.2014.02.03.04.30.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 04:30:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of sumit.semwal@linaro.org) client-ip=209.85.160.52; Received: by mail-pb0-f52.google.com with SMTP id jt11so7033261pbb.11 for ; Mon, 03 Feb 2014 04:30:09 -0800 (PST) X-Received: by 10.67.22.38 with SMTP id hp6mr37105725pad.53.1391430609020; Mon, 03 Feb 2014 04:30:09 -0800 (PST) Received: from localhost.localdomain ([122.179.40.212]) by mx.google.com with ESMTPSA id db3sm55650937pbb.10.2014.02.03.04.30.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 04:30:08 -0800 (PST) From: Sumit Semwal To: linux@arm.linux.org.uk Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Sumit Semwal Subject: [PATCH] dma-buf: update debugfs output Date: Mon, 3 Feb 2014 17:59:41 +0530 Message-Id: <1391430581-18522-1-git-send-email-sumit.semwal@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sumit.semwal@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Russell King observed 'wierd' looking output from debugfs, and also suggested better ways of getting device names (use KBUILD_MODNAME, dev_name()) This patch addresses these issues to make the debugfs output correct and better looking. Signed-off-by: Sumit Semwal --- drivers/base/dma-buf.c | 18 ++++++++---------- include/linux/dma-buf.h | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c index cfe1d8b..bf89fe3 100644 --- a/drivers/base/dma-buf.c +++ b/drivers/base/dma-buf.c @@ -621,7 +621,7 @@ static int dma_buf_describe(struct seq_file *s) return ret; seq_printf(s, "\nDma-buf Objects:\n"); - seq_printf(s, "\texp_name\tsize\tflags\tmode\tcount\n"); + seq_printf(s, "size\tflags\tmode\tcount\texp_name\n"); list_for_each_entry(buf_obj, &db_list.head, list_node) { ret = mutex_lock_interruptible(&buf_obj->lock); @@ -632,24 +632,22 @@ static int dma_buf_describe(struct seq_file *s) continue; } - seq_printf(s, "\t"); - - seq_printf(s, "\t%s\t%08zu\t%08x\t%08x\t%08ld\n", - buf_obj->exp_name, buf_obj->size, + seq_printf(s, "%08zu\t%08x\t%08x\t%08ld\t%s\n", + buf_obj->size, buf_obj->file->f_flags, buf_obj->file->f_mode, - (long)(buf_obj->file->f_count.counter)); + (long)(buf_obj->file->f_count.counter), buf_obj->exp_name); - seq_printf(s, "\t\tAttached Devices:\n"); + seq_printf(s, "\tAttached Devices:\n"); attach_count = 0; list_for_each_entry(attach_obj, &buf_obj->attachments, node) { - seq_printf(s, "\t\t"); + seq_printf(s, "\t"); - seq_printf(s, "%s\n", attach_obj->dev->init_name); + seq_printf(s, "%s\n", dev_name(attach_obj->dev)); attach_count++; } - seq_printf(s, "\n\t\tTotal %d devices attached\n", + seq_printf(s, "\nTotal %d devices attached\n", attach_count); count++; diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index dfac5ed..f886985 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -171,7 +171,7 @@ struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, size_t size, int flags, const char *); #define dma_buf_export(priv, ops, size, flags) \ - dma_buf_export_named(priv, ops, size, flags, __FILE__) + dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME) int dma_buf_fd(struct dma_buf *dmabuf, int flags); struct dma_buf *dma_buf_get(int fd);