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] [day] [month] [year] [list]
Message-ID: <52F39A56.4050309@epfl.ch>
Date:	Thu, 06 Feb 2014 15:21:10 +0100
From:	Florian Vaussard <florian.vaussard@...l.ch>
To:	Marc Kleine-Budde <mkl@...gutronix.de>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Wolfgang Grandegger <wg@...ndegger.com>
CC:	Andreas Larsson <andreas@...sler.com>, linux-can@...r.kernel.org,
	netdev@...r.kernel.org, sparclinux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/5] can: sja1000: of: add reg-io-width property for
 8, 16 and 32-bit register access

Hi,

On 02/06/2014 11:57 AM, Marc Kleine-Budde wrote:
> On 01/31/2014 03:08 PM, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 31-01-2014 17:34, Florian Vaussard wrote:
>>
>>> Add the 'reg-io-width' property for 8, 16 and 32-bit access, like
>>> what is currently done with IORESOURCE_MEM_{8,16,32}BIT for non-OF
>>> boot.
>>
>>> Signed-off-by: Florian Vaussard <florian.vaussard@...l.ch>
>>> ---
>>>   drivers/net/can/sja1000/sja1000_platform.c | 16 ++++++++++++++--
>>>   1 file changed, 14 insertions(+), 2 deletions(-)
>>
>>> diff --git a/drivers/net/can/sja1000/sja1000_platform.c
>>> b/drivers/net/can/sja1000/sja1000_platform.c
>>> index 50dece8..25122bf 100644
>>> --- a/drivers/net/can/sja1000/sja1000_platform.c
>>> +++ b/drivers/net/can/sja1000/sja1000_platform.c
>>> @@ -102,8 +102,20 @@ static void sp_populate_of(struct sja1000_priv
>>> *priv, struct device_node *of)
>>>       int err;
>>>       u32 prop;
>>>
>>> -    priv->read_reg = sp_read_reg8;
>>> -    priv->write_reg = sp_write_reg8;
>>> +    err = of_property_read_u32(of, "reg-io-width", &prop);
>>> +    if (err)
>>> +        prop = 1;
>>> +
>>> +    if (prop == 4) {
>>
>>    This is asking to be a *switch* statement instead.
> 
> Good point, I'll send a v4.
> 

Thank you!

Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ