lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Apr 2014 19:52:18 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Michal Simek <monstr@...str.eu>
Cc:	Harini Katakam <harinikatakamlinux@...il.com>,
	Alexandre Courbot <gnurou@...il.com>,
	Michal Simek <michal.simek@...inx.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Rob Landley <rob@...dley.net>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	michals@...inx.com, Ulf Hansson <ulf.hansson@...aro.org>
Subject: Re: [PATCH 1/2] GPIO: Add driver for Zynq GPIO controller

On Wed, Apr 2, 2014 at 7:56 AM, Michal Simek <monstr@...str.eu> wrote:
> On 03/31/2014 10:22 AM, Linus Walleij wrote:
>> On Sat, Mar 29, 2014 at 5:44 AM, Harini Katakam
>> <harinikatakamlinux@...il.com> wrote:
>>> On Sat, Mar 29, 2014 at 3:20 AM, Linus Walleij <linus.walleij@...aro.org> wrote:
>>>> On Thu, Mar 27, 2014 at 4:25 PM, Harini Katakam <harinik@...inx.com> wrote:
>>
>>>>> +/* Read/Write access to the GPIO PS registers */
>>>>> +static inline u32 zynq_gpio_readreg(void __iomem *offset)
>>>>> +{
>>>>> +       return readl_relaxed(offset);
>>>>> +}
>>>>> +
>>>>> +static inline void zynq_gpio_writereg(void __iomem *offset, u32 val)
>>>>> +{
>>>>> +       writel_relaxed(val, offset);
>>>>> +}
>>>>
>>>> I think this is unnecessary and confusing indirection.
>>>> Just use the readl_relaxed/writel_relaxed functions directly in
>>>> the code.
>>>>
>>>
>>> This is just to be flexible.
>>
>> Define exactly what you mean with "flexible" in this context. I
>> only see unnecessary overhead and hard-to-read code.
>
> We have just passed this discussion for watchdog driver
> here: https://lkml.org/lkml/2014/4/1/843
>
> Are you ok with doing it in this way?

No :-)

Subsystem maintainers do not necessarily agree on such issues.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ