Received: by 10.192.165.148 with SMTP id m20csp1584629imm; Sat, 28 Apr 2018 00:47:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpx8Dip8+oMQftg1+tQzb9U27ya9cnFVnhiaAySm36D/3sF8zWn6hXHkazFLg4yyLD3X6Ps X-Received: by 2002:a17:902:8307:: with SMTP id bd7-v6mr4836647plb.234.1524901624643; Sat, 28 Apr 2018 00:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524901624; cv=none; d=google.com; s=arc-20160816; b=XpA5GH0c1roC3OEsiAQm4KonR5Z5BObiE7CUAMKbRADEuWk4Ef6nc98+xHHhSXJ9O2 thCLVT6+8NFbRMK2jh6rU2rGJ6BEfbmUkimNv80NgPLTK8HWVSn0l8Bgk0hLGXGKL/0F Dusd1I6ubGuwpIDbGbuQQDOz3ycmTwpkNRqOIUAkOPF/pwcu5akRJko/pXZTF9YODUjh o4H1s+/kVgdBAWhWV8kQ/XmnBv3010y8BkVi2YIXmItHCcFjRw8sJQLk+3M9XuUNIJSs kq/R3tQVlBj5+1h6yl023QYfsOXcrnEgALKlWCttMf8Z457SAS/WwgUsuDI8AAseQyVn Lnvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:arc-authentication-results; bh=1QM2inY+vGEYeGhm+VHZzX4j5JudNfNmV958Y2J2qSo=; b=1IQuKkMSVhbEKET9Kad7SOIQ7YpALYLZ4/AFn06FmJs71zgCGgw+0x/FocYB0415il 1MOtnCDK0qPJU4F0xxdKV/XyTlZC1UB0yKb0IGFp69lKaCNJd2SlZronQivYhU2oH4eD joNHYkJPx3PnROxF+21V3Z5q/39fAWtZsZWxhwvkYDPbA6CIIgR6GLUixhr9M7h8DI92 bfSYTNecPqXHLbclc7PLXYMX3un7Mpva+zjcK2Nu4Tbp505vX3Q5joXe56RR1HcWx1Nl WlzvK7XtVfACgbz4U/vVCiSSKmwLjuwdY9WNOsTbt/0Pe/gMsp1rv2x83JTE3vE84fTa wotQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si2716540plr.6.2018.04.28.00.46.38; Sat, 28 Apr 2018 00:47:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933422AbeD1Hov (ORCPT + 99 others); Sat, 28 Apr 2018 03:44:51 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54495 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752688AbeD1Hou (ORCPT ); Sat, 28 Apr 2018 03:44:50 -0400 X-IronPort-AV: E=Sophos;i="5.49,338,1520895600"; d="scan'208";a="324881494" Received: from 85-171-61-52.rev.numericable.fr (HELO [192.168.0.15]) ([85.171.61.52]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Apr 2018 09:44:49 +0200 Date: Sat, 28 Apr 2018 09:44:48 +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: core: 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: ec8245f7a36f ("mhi_bus: core: Add support for MHI host interface") 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: 3 hours ago :::::: commit date: 3 hours ago mhi_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/bus/mhi/core/mhi_init.c +++ b/drivers/bus/mhi/core/mhi_init.c @@ -233,8 +233,8 @@ static const struct file_operations debu .read = seq_read, }; -DEFINE_SIMPLE_ATTRIBUTE(debugfs_trigger_reset_fops, NULL, - mhi_debugfs_trigger_reset, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(debugfs_trigger_reset_fops, NULL, + mhi_debugfs_trigger_reset, "%llu\n"); void mhi_init_debugfs(struct mhi_controller *mhi_cntrl) { @@ -257,8 +257,8 @@ void mhi_init_debugfs(struct mhi_control debugfs_create_file("events", 0444, dentry, mhi_cntrl, &debugfs_ev_ops); debugfs_create_file("chan", 0444, dentry, mhi_cntrl, &debugfs_chan_ops); - debugfs_create_file("reset", 0444, dentry, mhi_cntrl, - &debugfs_trigger_reset_fops); + debugfs_create_file_unsafe("reset", 0444, dentry, mhi_cntrl, + &debugfs_trigger_reset_fops); mhi_cntrl->dentry = dentry; }