Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1336805
| From | Joachim Eastwood <manabian@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the NVMEM framework |
| Date | 2016-02-17 23:10 +0100 |
| Message-ID | <r3isi-4iJ-17@gated-at.bofh.it> (permalink) |
| References | <r3gAa-2Xm-11@gated-at.bofh.it> <r3gJR-31I-21@gated-at.bofh.it> <r3isi-4iJ-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 17 February 2016 at 23:02, Joachim Eastwood <manabian@gmail.com> wrote:
> Hi Andrew,
>
> On 17 February 2016 at 21:07, Andrew Lunn <andrew@lunn.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv5 0/7] Convert exiting EEPROM drivers to NVMEM Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:10 +0100
[PATCHv5 2/7] nvmem: Add backwards compatibility support for older EEPROM drivers. Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:10 +0100
[PATCHv5 7/7] misc: at24: replace memory_accessor with nvmem_device_read Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:10 +0100
[PATCHv5 3/7] eeprom: at24: extend driver to plug into the NVMEM framework Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:10 +0100
Re: [PATCHv5 3/7] eeprom: at24: extend driver to plug into the NVMEM framework Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-02-18 11:30 +0100
[PATCHv5 5/7] eeprom: at25: extend driver to plug into the NVMEM framework Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:10 +0100
[PATCHv5 1/7] nvmem: Add flag to export NVMEM to root only Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:20 +0100
[PATCHv5 4/7] eeprom: at25: Remove in kernel API for accessing the EEPROM Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:20 +0100
[PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the NVMEM framework Andrew Lunn <andrew@lunn.ch> - 2016-02-17 21:20 +0100
Re: [PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the NVMEM framework Joachim Eastwood <manabian@gmail.com> - 2016-02-17 23:10 +0100
Re: [PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the NVMEM framework Joachim Eastwood <manabian@gmail.com> - 2016-02-17 23:10 +0100
Re: [PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the NVMEM framework Andrew Lunn <andrew@lunn.ch> - 2016-02-17 23:20 +0100
Re: [PATCHv5 6/7] eeprom: 93xx46: extend driver to plug into the NVMEM framework Joachim Eastwood <manabian@gmail.com> - 2016-02-17 23:20 +0100
csiph-web