Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Sujeev Dias <sdias@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Tony Truong <truong@codeaurora.org>,
	kbuild-all@01.org
Subject: [PATCH] mhi_bus: dev: netdev: fix debugfs_simple_attr.cocci warnings
Date: Sat, 28 Apr 2018 09:19:43 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1804280918360.2700@hadrien> (raw)

From: Fengguang Wu <fengguang.wu@intel.com>

 Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
 for debugfs files.

 Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
 imposes some significant overhead as compared to
 DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Fixes: e693c860afd8 ("mhi_bus: dev: netdev: add network interface driver")
CC: Sujeev Dias <sdias@codeaurora.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

url:
https://github.com/0day-ci/linux/commits/Sujeev-Dias/mhi_bus-core-Add-support-for-MHI-host-interface/20180428-065959
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago

 mhi_netdev.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/bus/mhi/devices/mhi_netdev.c
+++ b/drivers/bus/mhi/devices/mhi_netdev.c
@@ -692,8 +692,8 @@ static int mhi_netdev_debugfs_trigger_re

 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(mhi_netdev_debugfs_trigger_reset_fops, NULL,
-			mhi_netdev_debugfs_trigger_reset, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(mhi_netdev_debugfs_trigger_reset_fops, NULL,
+			 mhi_netdev_debugfs_trigger_reset, "%llu\n");

 static void mhi_netdev_create_debugfs(struct mhi_netdev *mhi_netdev)
 {
@@ -762,8 +762,9 @@ static void mhi_netdev_create_debugfs(st
 			return;
 	}

-	debugfs_create_file("reset", mode, mhi_netdev->dentry, mhi_netdev,
-			    &mhi_netdev_debugfs_trigger_reset_fops);
+	debugfs_create_file_unsafe("reset", mode, mhi_netdev->dentry,
+				   mhi_netdev,
+				   &mhi_netdev_debugfs_trigger_reset_fops);
 }

 static void mhi_netdev_create_debugfs_dir(void)

                 reply	other threads:[~2018-04-28  7:19 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=alpine.DEB.2.20.1804280918360.2700@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdias@codeaurora.org \
    --cc=truong@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox