Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754759AbdLTJAM (ORCPT ); Wed, 20 Dec 2017 04:00:12 -0500 Received: from 50-87-157-213.static.tentacle.fi ([213.157.87.50]:49549 "EHLO bitmer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754164AbdLTJAJ (ORCPT ); Wed, 20 Dec 2017 04:00:09 -0500 X-Greylist: delayed 1503 seconds by postgrey-1.27 at vger.kernel.org; Wed, 20 Dec 2017 04:00:06 EST Date: Wed, 20 Dec 2017 10:34:03 +0200 From: Jarkko Nikula To: Joe Perches Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Cezary Jackiewicz , Darren Hart , Andy Shevchenko , Sebastian Ott , Peter Oberparleiter , James Smart , Dick Kennedy , Zhang Rui , Eduardo Valentin , Greg Kroah-Hartman , Mathias Nyman , Felipe Balbi , "Luis R. Rodriguez" , Peter Ujfalusi , Martin Schwidefsky , Heiko Carstens , David Airlie , "James E.J. Bottomley" , "Martin K. Petersen" , Jiri Slaby , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, linux-scsi@vger.kernel.org, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org, linux-omap@vger.kernel.org Subject: Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW Message-ID: <20171220083403.GA27231@bitmer.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 978 Lines: 27 On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote: > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible. > ... > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c > index 7a54e3083203..79d4dc785e5c 100644 > --- 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 *dev, > return size; > } > > -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store); > +static DEVICE_ATTR_RW(dma_op_mode); > 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: DEVICE_ATTR_RW: include/linux/device.h __ATTR_RW: include/linux/sysfs.h S_IWUSR: include/uapi/linux/stat.h S_IRUGO: include/linux/stat.h Jarkko Nikula