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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 CBA1BC5519F for ; Wed, 18 Nov 2020 08:51:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6703A241A5 for ; Wed, 18 Nov 2020 08:51:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Gga3KWoY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbgKRIvR (ORCPT ); Wed, 18 Nov 2020 03:51:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbgKRIvQ (ORCPT ); Wed, 18 Nov 2020 03:51:16 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99A78C0613D4 for ; Wed, 18 Nov 2020 00:51:16 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id c17so1287172wrc.11 for ; Wed, 18 Nov 2020 00:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=cdTlLYpoqg49dJytKCngMw0Q/QviqDLm+/R80RdfooU=; b=Gga3KWoYVZfDr07yxKSI+OzcScUs4GDiJQTw5BVHnFRVvdvIe3jmFXyOk/AC0jA1bF mFzyVmgeVITsSycvHLBWC+NRbSBkgMXnnRVC2WG8+AT2p0qKzdnMJRrs2iye4hcZoO3E NE5qJ7CO+t9obqci6xcSh7B/eMNfHCRlWDN6bRnUy8jUsYMuPLzCJkJCgAlocX98bOi0 aerNculhYVOSBkYIVqa2m8jMse+470XYeoZEyKFIwE/zGTUAnLIH88ET9jJ8beKNXr2k yjdQA5QIrNpRgpaUIq9MF3W8ZS0i/mdxJDAtji5R2HwS+RrWSKWwPHh4/B3WVz+TxHdN CR6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=cdTlLYpoqg49dJytKCngMw0Q/QviqDLm+/R80RdfooU=; b=pwy1HKrEXoVDR1M8JW49eSVaVkU/lGMKymEIgIfSzzISrGspycGyN8LI0Xm4tBxfCI 2IskxbGj9Nj08LQ8nPOhltfYjzD+4zXpu2m84A5fNAgUQdPYcYFm8/ieDx7O0hBAogEV 2sgDp3L559Jmk3fAq1q0f6Vl5RHP5woxYNDA02zzqlvyyPbKID40TLIQnt19EsU10NYZ Iwy4h/Ih9r/Zj4XUXxSt9F8MZISh2BorZddEUfX4JJ7OjfmCfevc7kTQLCsmIZEcOk5l fh9qEPuo0UodGnK4a+De3DFFDjcMOp0EVLqlYCYR3JLFS/HIBtjpTJYEjMqkfPUaXMkY FXAw== X-Gm-Message-State: AOAM533i8mwbxef+tyK4ODioVFVB5kZ6uWlwhejOj70zqFeH7/WultEX TR70grtorXEqNwJbRTPMmEewdg== X-Google-Smtp-Source: ABdhPJwWERf6qt3Q/4PwXA+tgR/h91DCBbx7+RMOUS5nVnmcEa0Rh+Bh6BZGr5p5uAhPdy3wtG1MAA== X-Received: by 2002:a5d:4f12:: with SMTP id c18mr3663146wru.304.1605689475334; Wed, 18 Nov 2020 00:51:15 -0800 (PST) Received: from dell ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id c2sm33963964wrf.68.2020.11.18.00.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 00:51:14 -0800 (PST) Date: Wed, 18 Nov 2020 08:51:13 +0000 From: Lee Jones To: Soham Biswas Cc: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pwm: core: Use octal permission Message-ID: <20201118085113.GO1869941@dell> References: <20201117175452.26914-1-sohambiswas41@gmail.com> <20201117181214.GK1869941@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Nov 2020, Soham Biswas wrote: > This fixes the following warning: > > `drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are > not preferred. Consider using octal permissions '0444'.` > > generated by the following script: > > `./scripts/checkpatch.pl --file --terse drivers/pwm/core.c` Oh, it's a checkpatch.pl thing. You should definitely quote the warning and describe where it came from in the commit log. Not entirely sure what that warning is the result of. Probably as they're sightly harder to read and easier to get wrong. Still, I'll let Thierry decide whether the patch itself is suitable for inclusion into the PWM core. > On Tue, 17 Nov 2020 at 23:42, Lee Jones wrote: > > > > On Tue, 17 Nov 2020, Soham Biswas wrote: > > > > > Fixed Warning. > > > > Which warning does this fix? > > > > > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'. > > > > This is semantically equivalent. > > > > Not sure what and/or how this fixes anything. > > > > > Signed-off-by: Soham Biswas > > > --- > > > drivers/pwm/core.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c > > > index 1f16f5365d3c..a8eff4b3ee36 100644 > > > --- a/drivers/pwm/core.c > > > +++ b/drivers/pwm/core.c > > > @@ -1338,7 +1338,7 @@ DEFINE_SEQ_ATTRIBUTE(pwm_debugfs); > > > > > > static int __init pwm_debugfs_init(void) > > > { > > > - debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, > > > + debugfs_create_file("pwm", S_IFREG | 0444, NULL, NULL, > > > &pwm_debugfs_fops); > > > > > > return 0; > > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog