Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754948AbcJ3L3A (ORCPT ); Sun, 30 Oct 2016 07:29:00 -0400 Received: from bitmer.com ([213.157.87.50]:38063 "EHLO bitmer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbcJ3L27 (ORCPT ); Sun, 30 Oct 2016 07:28:59 -0400 X-Greylist: delayed 1785 seconds by postgrey-1.27 at vger.kernel.org; Sun, 30 Oct 2016 07:28:58 EDT Date: Sun, 30 Oct 2016 12:58:51 +0200 From: Jarkko Nikula To: Julia Lawall Cc: Peter Ujfalusi , kernel-janitors@vger.kernel.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/15] ASoC: omap-mcbsp: use permission-specific DEVICE_ATTR variants Message-Id: <20161030125851.bd0e74854c52ce7d4ab3570c@bitmer.com> In-Reply-To: <1477769829-22230-11-git-send-email-Julia.Lawall@lip6.fr> References: <1477769829-22230-1-git-send-email-Julia.Lawall@lip6.fr> <1477769829-22230-11-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: Sylpheed 3.5.0beta1 (GTK+ 2.24.25; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 557 Lines: 18 Hi On Sat, 29 Oct 2016 21:37:04 +0200 Julia Lawall wrote: > Use DEVICE_ATTR_RW for read-write attributes. This simplifies the > source code, improves readbility, and reduces the chance of > inconsistencies. > ... > > - DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store); > + DEVICE_ATTR_RW(x); I'm not so sure does this improve readability. 644 is pretty obvious but for DEVICE_ATTR_RW() one has to dive into include/linux/device.h and include/linux/sysfs.h to see for what users it grants the write access. -- Jarkko