From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AB8JxZqooOT147yt7TfQ+K8/DlH9bFAHAxxW0tuockiGw7YKQzN4LSO33XhqyVa5EnFmfcYh99lI ARC-Seal: i=1; a=rsa-sha256; t=1524899984; cv=none; d=google.com; s=arc-20160816; b=0bWJu9fVjVIJCwzCTvJQ9lTlHDonnufDc+/ZN0xwCJnqmYMBQXdYmq1Heh0/kmBLlD uIV/CX10Jqdd7wXvw5LV5PhcqDcZJFk61bS+HbRSzh3cwVPjw73+LvtLPdbEKsjGBIgw Q0gMB3xsdJwc8qdoYQVra9piZ3ppcCGY0z/1ohUNM21zH1bV+V1LrslVvKpqtvcVBkjh AHZvD3Lz6ykwlMPVHO4Y+UNwUrFomPpNTTtM4kpNRETnkASAqEEClwB9YLc7UvuLgQxL wam7OD9uNYuYKUCYWogDlJU1z0bnjr5e8dyKynmhsKvDN+SPUF+akFYCBv2ATfVONpSu xHNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:subject:cc:to:from:date :arc-authentication-results; bh=yYjuCVWgpeaYsB/gNINHA46nSZeRTpQB7xew3ADb8PI=; b=T9sxKx5HEV2bAQOn0DEzmfda6W5Z2hUuJ3hOYargYtOMmFOtaN58u3dSPu43Mv9ke3 9jrGk/p9brc4sEAsewDPGCURqX5vHI6IBOfTTTe2kNMnUYXcVRgbe6MCOqpHiWqI8RyP PNCzutA+XP9oD4rZqkO2deTDD1E943cljcIhmoAavFtum3G3xUs/reuJs07u8nYWDG0Q DBR87mI5qtZ3Mej8LTPhNPIAOKuOcOWmC6dufWH9kG2O8rQp4vQa8qyEERVAfYfo49Da +64RpyKEEIM7VhfcKeomr/V2uL2Z28uFpKiA8jaVtvqdWGqvGmwcKi9N9YMbSCX6AHKi JYTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 192.134.164.83 is neither permitted nor denied by domain of julia.lawall@lip6.fr) smtp.mailfrom=julia.lawall@lip6.fr Authentication-Results: mx.google.com; spf=neutral (google.com: 192.134.164.83 is neither permitted nor denied by domain of julia.lawall@lip6.fr) smtp.mailfrom=julia.lawall@lip6.fr X-IronPort-AV: E=Sophos;i="5.49,338,1520895600"; d="scan'208";a="324880313" Date: Sat, 28 Apr 2018 09:19:43 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sujeev Dias cc: Greg Kroah-Hartman , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Tony Truong , kbuild-all@01.org Subject: [PATCH] mhi_bus: dev: netdev: fix debugfs_simple_attr.cocci warnings Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1598973525795286646?= X-GMAIL-MSGID: =?utf-8?q?1598973525795286646?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: From: Fengguang Wu 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 Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- 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)