From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Date: Wed, 10 Jan 2018 14:43:02 +0000 Subject: Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW Message-Id: <41847882-9ad9-aeb1-009b-2f9b2fdb656e@ti.com> List-Id: References: <20171220083403.GA27231@bitmer.com> <1513761884.1234.83.camel@perches.com> <20171220093211.GA16177@kroah.com> <20171220105404.GA29856@bitmer.com> In-Reply-To: <20171220105404.GA29856@bitmer.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Jarkko Nikula , Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, David Airlie , Joonas Lahtinen , Heiko Carstens , alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Jaroslav Kysela , linux-s390@vger.kernel.org, linux-omap@vger.kernel.org, "James E.J. Bottomley" , linux-scsi@vger.kernel.org, Takashi Iwai , Sebastian Ott , James Smart , Cezary Jackiewicz , linux-serial@vger.kernel.org, Jiri Slaby , Darren Hart , Zhang Rui , Dick Kennedy , Mathias Nyman , Bartlomiej Zolnierkiewicz , Peter Oberparleiter , intel-gfx@lists. On 2017-12-20 12:54, Jarkko Nikula wrote: > On Wed, Dec 20, 2017 at 10:32:11AM +0100, Greg Kroah-Hartman wrote: >> On Wed, Dec 20, 2017 at 01:24:44AM -0800, Joe Perches wrote: >>> On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote: >>>> On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote: >>>>> Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible. >>> []=20 >>>>> diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c >>> [] >>>>> @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *d= ev, >>>>> return size; >>>>> } >>>>> =20 >>>>> -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_= store); >>>>> +static DEVICE_ATTR_RW(dma_op_mode); >>>>> =20 >>>> >>>> While I can ack this part here if it helps generic cleanup effort I >>>> don't understart would it improve code readability in general? Mode 644 >>>> is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to= go >>>> through all of these files in order to see what does it mean: >> >> Yeah, 644 is "clear", but _RW() is even more clear. Ideally I want to >> get rid of all of the "non-standard" users that set random modes of >> sysfs files, as we get it wrong too many times. Using the "defaults" is >> much better. >> > Fair enough. For the sound/soc/omap/ (Acked-by was missing from my > previous reply): >=20 > Acked-by: Jarkko Nikula And from me to the same file (sound/soc/omap/mcbsp.c): Acked-by: Peter Ujfalusi - P=C3=A9ter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki