Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933879AbeAJOoj (ORCPT + 1 other); Wed, 10 Jan 2018 09:44:39 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:18337 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932310AbeAJOog (ORCPT ); Wed, 10 Jan 2018 09:44:36 -0500 Subject: Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW To: Jarkko Nikula , Greg Kroah-Hartman CC: Joe Perches , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Cezary Jackiewicz , Darren Hart , Andy Shevchenko , Sebastian Ott , Peter Oberparleiter , James Smart , Dick Kennedy , Zhang Rui , Eduardo Valentin , Mathias Nyman , Felipe Balbi , "Luis R. Rodriguez" , 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 , , , , , , , , , , , , References: <20171220083403.GA27231@bitmer.com> <1513761884.1234.83.camel@perches.com> <20171220093211.GA16177@kroah.com> <20171220105404.GA29856@bitmer.com> From: Peter Ujfalusi Message-ID: <41847882-9ad9-aeb1-009b-2f9b2fdb656e@ti.com> Date: Wed, 10 Jan 2018 16:43:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20171220105404.GA29856@bitmer.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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. >>> [] >>>>> 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 *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: >> >> 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): > > Acked-by: Jarkko Nikula And from me to the same file (sound/soc/omap/mcbsp.c): Acked-by: Peter Ujfalusi - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki