Received: by 10.213.65.68 with SMTP id h4csp149066imn; Fri, 30 Mar 2018 02:52:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/lEg3l6KEzPW7b76VNBcNnQ6xiEWsTYJ9dbPBbxS++OakFRSfH92FOycMS+F22XYjOxoKh X-Received: by 2002:a17:902:8689:: with SMTP id g9-v6mr12100468plo.247.1522403526754; Fri, 30 Mar 2018 02:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522403526; cv=none; d=google.com; s=arc-20160816; b=TZ+eUWjSi+C7Y3vINCmXuIaVEurxHBp2sk/nsMnZ/77YolZ9XkrOVg1hM4btVW0GEy 4HV0EX5eVdy5OUSJe5lU9kX4TP3fBK0KMHnkVS3RHsT69m2FLZEyqLZoZdqt9AY76X+A 3cVpdFbKCpzgv9kdM77Nr8ruIqwqtnSxGHLUrjwFKeBOmes1IIDryNtNGuGf4bxJiaea ED7CWXdQ/dnkJpZtpGrDGp0ufhJ9QqyOWLV08fdHln7XzOLsry+CyEVgDwj2H1IU/UT0 DJW0Se8rNFbBkXQ5FudLdPrw6q+lQGuxNHtafx/NZIG4O3Tpka1EN1VEC5O4xPj1CdsT BR3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=j9duXJtbYWAkSZ+DSgywJc2QwW6tj/8aHphGrJNDSRs=; b=VyaeJFa/BLkWT9Gv0qtuR7mWx2/s2NXNOSRjRYpJ+a0Xsm1UoQoq6HQN/KbMD4jeYC DojjldXlIXNCzRnw8louHAqzSducqI5mXJ2tukULjDTuLnXQcYah4rn/u5YhyeCc6fIe t4DBdt4LexGEUbQf0WTGFJrmE2JifEjDO6w+b4spakQUKbNqHnZ0PzX0T9LnnnJsP1ME gBAl+YNbfx5LnnschHFucXFPgEqrOJB1gArjFArXcPG4SpMHyoHc6E4bVzaWJ5JtKSCx fr2iSQvwb4dsDBiyG70hqh0a1H+XDTbKW0/xdSXUzbLAoObj28FvcHYl8yQ6cm+0Qxx4 k/MQ== 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 bj8-v6si8361433plb.306.2018.03.30.02.51.53; Fri, 30 Mar 2018 02:52:06 -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 S1751415AbeC3Juq (ORCPT + 99 others); Fri, 30 Mar 2018 05:50:46 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:63986 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbeC3Juo (ORCPT ); Fri, 30 Mar 2018 05:50:44 -0400 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id c6627f8dc0d6940a; Fri, 30 Mar 2018 11:50:42 +0200 From: "Rafael J. Wysocki" To: Julia Lawall Cc: Francisco Jerez , kbuild-all@01.org, Srinivas Pandruvada , Len Brown , Viresh Kumar , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, 0day robot Subject: Re: [PATCH] OPTIONAL: cpufreq/intel_pstate: fix debugfs_simple_attr.cocci warnings Date: Fri, 30 Mar 2018 11:51:01 +0200 Message-ID: <2337789.pyKKFBg1Bd@aspire.rjw.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit 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 Hi Julia, On Thursday, March 29, 2018 9:12:06 PM CEST Julia Lawall wrote: > Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE > for debugfs files. > > Semantic patch information: > 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 We've dropped the debugfs bits from intel_pstate entirely, so this change is not applicable any more. Thanks! > Fixes: 9eec7989e762 ("OPTIONAL: cpufreq/intel_pstate: Expose LP controller parameters via debugfs.") > CC: Francisco Jerez > Signed-off-by: Fengguang Wu > Signed-off-by: Julia Lawall > --- > > I don't actually know anything about this issue. The change was suggested > by kbuild. > > intel_pstate.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > --- a/drivers/cpufreq/intel_pstate.c > +++ b/drivers/cpufreq/intel_pstate.c > @@ -885,7 +885,7 @@ static int lp_param_get(void *data, u64 > *val = *(u32 *)data; > return 0; > } > -DEFINE_SIMPLE_ATTRIBUTE(fops_lp_param, lp_param_get, lp_param_set, "%llu\n"); > +DEFINE_DEBUGFS_ATTRIBUTE(fops_lp_param, lp_param_get, lp_param_set, "%llu\n"); > > static struct dentry *debugfs_parent; > > @@ -922,9 +922,10 @@ static void intel_pstate_debug_expose_pa > for (i = 0; lp_files[i].name; i++) { > struct dentry *dentry; > > - dentry = debugfs_create_file(lp_files[i].name, 0660, > - debugfs_parent, lp_files[i].value, > - &fops_lp_param); > + dentry = debugfs_create_file_unsafe(lp_files[i].name, 0660, > + debugfs_parent, > + lp_files[i].value, > + &fops_lp_param); > if (!IS_ERR(dentry)) > lp_files[i].dentry = dentry; > } >