From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D14CEC282DD for ; Wed, 8 Jan 2020 16:58:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE2782072A for ; Wed, 8 Jan 2020 16:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729616AbgAHQ6d (ORCPT ); Wed, 8 Jan 2020 11:58:33 -0500 Received: from mga02.intel.com ([134.134.136.20]:22870 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727308AbgAHQ6c (ORCPT ); Wed, 8 Jan 2020 11:58:32 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 08:58:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,410,1571727600"; d="scan'208";a="216008936" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 08 Jan 2020 08:58:28 -0800 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1ipEf6-0005gm-7m; Wed, 08 Jan 2020 18:58:28 +0200 Date: Wed, 8 Jan 2020 18:58:28 +0200 From: Andy Shevchenko To: Mika Westerberg Cc: Darren Hart , Lee Jones , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, Zha Qipeng , Rajneesh Bhardwaj , "David E . Box" , Guenter Roeck , Heikki Krogerus , Greg Kroah-Hartman , Wim Van Sebroeck , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 33/36] platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributes Message-ID: <20200108165828.GQ32742@smile.fi.intel.com> References: <20200108114201.27908-1-mika.westerberg@linux.intel.com> <20200108114201.27908-34-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200108114201.27908-34-mika.westerberg@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 08, 2020 at 02:41:58PM +0300, Mika Westerberg wrote: > This is the current preferred way so replace the S_IWUSR with the > corresponding octal value. While there move the attributes to follow > directly their store functions. > Reviewed-by: Andy Shevchenko > Signed-off-by: Mika Westerberg > --- > drivers/platform/x86/intel_pmc_ipc.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c > index acec1c6d2069..20a4bb72aeac 100644 > --- a/drivers/platform/x86/intel_pmc_ipc.c > +++ b/drivers/platform/x86/intel_pmc_ipc.c > @@ -215,6 +215,7 @@ static ssize_t intel_pmc_ipc_simple_cmd_store(struct device *dev, > } > return (ssize_t)count; > } > +static DEVICE_ATTR(simplecmd, 0200, NULL, intel_pmc_ipc_simple_cmd_store); > > static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev, > struct device_attribute *attr, > @@ -240,11 +241,7 @@ static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev, > } > return (ssize_t)count; > } > - > -static DEVICE_ATTR(simplecmd, S_IWUSR, > - NULL, intel_pmc_ipc_simple_cmd_store); > -static DEVICE_ATTR(northpeak, S_IWUSR, > - NULL, intel_pmc_ipc_northpeak_store); > +static DEVICE_ATTR(northpeak, 0200, NULL, intel_pmc_ipc_northpeak_store); > > static struct attribute *intel_ipc_attrs[] = { > &dev_attr_northpeak.attr, > -- > 2.24.1 > -- With Best Regards, Andy Shevchenko