Received: by 10.213.65.68 with SMTP id h4csp1863540imn; Thu, 29 Mar 2018 12:28:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+CaAuq3BK47BiAv/mz+xP031Wz+Nn5I7rROYD96W41OkecSFHSqpkALNgawjqbbQ+GzcZC X-Received: by 10.98.76.196 with SMTP id e65mr6296102pfj.35.1522351728272; Thu, 29 Mar 2018 12:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522351728; cv=none; d=google.com; s=arc-20160816; b=NvbackywBcEJ85Q9FKsSKh2lmCIaTWrHKrujf2/DEJALPPhTCXRjytgXVxS76YdV5r +92H0ZPfJAcP1miBwVAddnLAKc40r3rxioCSz4RI/Xn5/el+/v8DOIu4lCoAEkOvhmp5 9JgdrWsu3mVerqZnhHpDMKinzR2ECf2b2m93q7zk+5ArG33lBXDlMBHsJZDy9P9zfh0E plbHVon1L3ZENimZtU+RW+krPL1F5GfleYdEeAtTwLTAefCXsPrqjt/BBms9FrGljgKF 8uaD6WjEx/My237gl6DoRN1L4qWiyzBsijGVLoKFDMHoHMDoKrY3a0qp2DbSWgOMs8Y0 6XyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=lIAcVGtO91p11EyLKpZbWxCcDAb4bc35mZ0tjYXuY0I=; b=fLYzohIYj32OuL7BJ8smmPUbGbg6w4r2ANzl95N66pEFLedmvTN2oeAEUx5L3Te48K Q1MUq8dx8vX3FPJbxtViVHotOLrLlD8JEwLTf937cRTSlkeVnkptoO1Y8jLps8kjSHTj ZbbIpUxzwmUgYbXY1SbHBTc+xorfe19PUO2E+NH3eDz+/K9w4PPEV3ol9ECdx0/qEPyo DD6dymuRcZEu5fambU9DmtjYDEt/SlsTGyCz17jGa1C6JBKsREnWKsEQmH3TmVrGYSGa RUUKsLy99+58fa+X7D21QL/JCWIT7yXauPKHZKBo+1uhSUhjI6TWVI+BHzGQD9+8s6Z/ K/JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=UQjHOrun; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si4448689pgt.83.2018.03.29.12.28.31; Thu, 29 Mar 2018 12:28:48 -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; dkim=pass header.i=@riseup.net header.s=squak header.b=UQjHOrun; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752090AbeC2T1N (ORCPT + 99 others); Thu, 29 Mar 2018 15:27:13 -0400 Received: from mx1.riseup.net ([198.252.153.129]:58744 "EHLO mx1.riseup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbeC2T1M (ORCPT ); Thu, 29 Mar 2018 15:27:12 -0400 Received: from cotinga.riseup.net (cotinga-pn.riseup.net [10.0.1.164]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 4EE051A0640; Thu, 29 Mar 2018 12:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1522351631; bh=SCq5trGsAZkfXDVk6x4ZvF3H5CjSdcjQ1IDcQ92mLM8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UQjHOrunOwVEV0wmnIgob8bLk3TEiOiTX7e+r2O5eEL3OSS6EwjHYwq7xoZkyGfzX znvcjm/qsQ7C+sVEmgMu3qBnjvigyikxqAiH0xg7Cf/PwTXSV2mijHXj8dz0Yw010M OVplLYzmDLZCTanWfDiR5fpV4Av3tLDEtM2pq2vs= X-Riseup-User-ID: 148BC26E2BE86E2CAD55CA41B716D20A82538E6447F5652E3EDAC1202E7A1C88 Received: from [127.0.0.1] (localhost [127.0.0.1]) by cotinga.riseup.net with ESMTPSA id 88C5DA41C9; Thu, 29 Mar 2018 12:27:10 -0700 (PDT) From: Francisco Jerez To: Julia Lawall Cc: kbuild-all@01.org, Srinivas Pandruvada , Len Brown , "Rafael J. Wysocki" , 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 In-Reply-To: References: Date: Thu, 29 Mar 2018 12:11:44 -0700 Message-ID: <87fu4iofwv.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Looks okay to me, I'll squash this into the original patch. Julia Lawall writes: > 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 > > 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; > } --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQST8OekYz69PM20/4aDmTidfVK/WwUCWr06cAAKCRCDmTidfVK/ W1tzAQCkR+JxyuMLfU5KUyQgaMZwgVwXuk24po5eoeGP/yxzlAEAo8GTmZThY5Sc cA3DSBjy6HnJ4ofhMeU5QNooaD8OQT8= =8eeU -----END PGP SIGNATURE----- --==-=-=--