Received: by 10.223.185.116 with SMTP id b49csp1096512wrg; Wed, 21 Feb 2018 12:03:25 -0800 (PST) X-Google-Smtp-Source: AH8x226xYrNaWlolfqjISbx8goVHnrNPxJ64920xiYYXtpu44EUBGJNFkiBrUTX6NyeuZPFZudoM X-Received: by 10.99.95.71 with SMTP id t68mr3567984pgb.321.1519243404981; Wed, 21 Feb 2018 12:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519243404; cv=none; d=google.com; s=arc-20160816; b=Ffcm3G5/9zn7WW6v0vWC2sKRg2AiGiDKjWZWaGQEtgTCAqz42bZ7gzujyLxznuCzva FZ+azTKW+qeJlurbyl60Rx5paPyINAYdTrGUKMoVAHvSET3L5e7EfVHPGOFBFLngmr8O I8rOWF3tzGtcZyxGfj2K23SsZ8PKPatUV83OOGA9Ck3nc5cg8SmWD8ItiPh7c7DCPe/2 pfcCMIy2Vn43ZKbk3Xu10iqo+mhu9O35oIcU11ZNOO4mKpHhFNT3sI33tSP+zJBjPtQi nfLr0hqiXiGkl2ltGAUW3t9bSaq/14pRPBpdLonBmFWaAx1dO284i5EheYubYkPRsXUo 2QAA== 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:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=X/2/GzfpwzB/nmFg9TF9GVkNM0tN6wNis612TDD/7Ao=; b=sw49L6w4NWz0WPQI2e+Q56/TT+TK3cq92atKF4YYn6gSLFmlVDwIAYAQo3LJ4ChzRV IDyw5HsPniNf64A6kf9GQgn6UnfCJWLcwKButEXx4NeDml1jEzoSRmDgsyQyz6BIdmpv Ne5sx8p2A+r28zKGMh1bnmJzmIxhzNUdZI3DBTPWozZg94XZLZKDGF/TQOcgo11iKfY0 0JFxaxecTaPxzb0KJPe3+UQW3irmeSt6MijmB8YZ1FABSQRW3wciWvk+NJ0b4J244+Q+ HyENw2PUyzotPVt715AtaK5+FWKSJNCPDpJb8lvDe22ftPVJL9hKnlJM+EMFmXOh7bjs TozA== 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 g11si3406590pfd.272.2018.02.21.12.03.10; Wed, 21 Feb 2018 12:03:24 -0800 (PST) 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 S1751363AbeBUUBw (ORCPT + 99 others); Wed, 21 Feb 2018 15:01:52 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:22515 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbeBUUBv (ORCPT ); Wed, 21 Feb 2018 15:01:51 -0500 X-IronPort-AV: E=Sophos;i="5.47,375,1515452400"; d="scan'208";a="255670103" Received: from abo-3-110-68.mrs.modulonet.fr (HELO [192.168.0.15]) ([85.68.110.3]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2018 21:01:46 +0100 Date: Wed, 21 Feb 2018 21:01:46 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Rodrigo Siqueira cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , daniel.baluta@nxp.com, linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] iio:dummy: Replace S_IWUSR by 0200 In-Reply-To: <20180221192807.qfyhp7z27f6r6p47@smtp.gmail.com> Message-ID: References: <20180221192807.qfyhp7z27f6r6p47@smtp.gmail.com> 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 On Wed, 21 Feb 2018, Rodrigo Siqueira wrote: > This patch fixes the checkpatch.pl warning: > > drivers/iio/dummy/iio_dummy_evgen.c:151: WARNING: Symbolic permissions > 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. I haven't studied up on it in great detail, but isn't there a more specific macro that doesn't need a permission argument at all? julia > ... > > Signed-off-by: Rodrigo Siqueira > --- > Changes in v2: > - Make the commit message clearer. > - Fix just a single part of the code. > > drivers/iio/dummy/iio_dummy_evgen.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/iio/dummy/iio_dummy_evgen.c b/drivers/iio/dummy/iio_dummy_evgen.c > index efd0005f59b4..16ea547f79f0 100644 > --- a/drivers/iio/dummy/iio_dummy_evgen.c > +++ b/drivers/iio/dummy/iio_dummy_evgen.c > @@ -148,16 +148,16 @@ static ssize_t iio_evgen_poke(struct device *dev, > return len; > } > > -static IIO_DEVICE_ATTR(poke_ev0, S_IWUSR, NULL, &iio_evgen_poke, 0); > -static IIO_DEVICE_ATTR(poke_ev1, S_IWUSR, NULL, &iio_evgen_poke, 1); > -static IIO_DEVICE_ATTR(poke_ev2, S_IWUSR, NULL, &iio_evgen_poke, 2); > -static IIO_DEVICE_ATTR(poke_ev3, S_IWUSR, NULL, &iio_evgen_poke, 3); > -static IIO_DEVICE_ATTR(poke_ev4, S_IWUSR, NULL, &iio_evgen_poke, 4); > -static IIO_DEVICE_ATTR(poke_ev5, S_IWUSR, NULL, &iio_evgen_poke, 5); > -static IIO_DEVICE_ATTR(poke_ev6, S_IWUSR, NULL, &iio_evgen_poke, 6); > -static IIO_DEVICE_ATTR(poke_ev7, S_IWUSR, NULL, &iio_evgen_poke, 7); > -static IIO_DEVICE_ATTR(poke_ev8, S_IWUSR, NULL, &iio_evgen_poke, 8); > -static IIO_DEVICE_ATTR(poke_ev9, S_IWUSR, NULL, &iio_evgen_poke, 9); > +static IIO_DEVICE_ATTR(poke_ev0, 0200, NULL, &iio_evgen_poke, 0); > +static IIO_DEVICE_ATTR(poke_ev1, 0200, NULL, &iio_evgen_poke, 1); > +static IIO_DEVICE_ATTR(poke_ev2, 0200, NULL, &iio_evgen_poke, 2); > +static IIO_DEVICE_ATTR(poke_ev3, 0200, NULL, &iio_evgen_poke, 3); > +static IIO_DEVICE_ATTR(poke_ev4, 0200, NULL, &iio_evgen_poke, 4); > +static IIO_DEVICE_ATTR(poke_ev5, 0200, NULL, &iio_evgen_poke, 5); > +static IIO_DEVICE_ATTR(poke_ev6, 0200, NULL, &iio_evgen_poke, 6); > +static IIO_DEVICE_ATTR(poke_ev7, 0200, NULL, &iio_evgen_poke, 7); > +static IIO_DEVICE_ATTR(poke_ev8, 0200, NULL, &iio_evgen_poke, 8); > +static IIO_DEVICE_ATTR(poke_ev9, 0200, NULL, &iio_evgen_poke, 9); > > static struct attribute *iio_evgen_attrs[] = { > &iio_dev_attr_poke_ev0.dev_attr.attr, > -- > 2.16.2 > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >