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]
Message-ID: <CAGhQ9VwwMXMMTdipXrGgEkDAM_O74_k-oO8=05E36jmnvxMLWw@mail.gmail.com>
Date:	Wed, 17 Feb 2016 23:08:35 +0100
From:	Joachim Eastwood <manabian@...il.com>
To:	Andrew Lunn <andrew@...n.ch>
Cc:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
	GregKH <greg@...ah.com>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Wolfram Sang <wsa@...-dreams.de>,
	Mark Brown <broonie@...nel.org>,
	Vladimir Zapolskiy <vz@...ia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
	bgolaszewski@...libre.com
Subject: Re: [PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the
 NVMEM framework

On 17 February 2016 at 23:02, Joachim  Eastwood <manabian@...il.com> wrote:
> Hi Andrew,
>
> On 17 February 2016 at 21:07, Andrew Lunn <andrew@...n.ch> wrote:
>> +/*
>> + * Provide a regmap interface, which is registered with the NVMEM
>> + * framework
>> +*/
>> +static int eeprom_93xx46_regmap_read(void *context, const void *reg,
>> +                                    size_t reg_size, void *val,
>> +                                    size_t val_size)
>> +{
>> +       struct eeprom_93xx46_dev *eeprom_93xx46 = context;
>> +       off_t offset = *(u32 *)reg;
>> +       int err;
>> +
>> +       err = eeprom_93xx46_read(eeprom_93xx46, val, offset, val_size);
>> +       if (err)
>> +               return err;
>> +       return 0;
>
> Can be:
> return eeprom_93xx46_read(eeprom_93xx46, val, offset, val_size);
>
> Allows you to remove the 'err' variable also.

You seem to do this consistently in the other patches as well. Any
particular reason?


regards,
Joachim Eastwood

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ