Messages in this thread | | | Date | Mon, 24 Feb 2020 11:08:42 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH v2 3/7] test_firmware: add partial read support for request_firmware_into_buf |
| |
On Fri, Feb 21, 2020 at 05:13:08PM -0800, Scott Branden wrote: > > > > +static ssize_t test_dev_config_show_size_t(char *buf, int cfg) > > > > +{ > > > > + size_t val; > > > > + > > > > + mutex_lock(&test_fw_mutex); > > > > + val = cfg; > > > > + mutex_unlock(&test_fw_mutex); > > > Both val and cfg are stack variables so there is no need for locking. > > > Probably you meant to pass a pointer to cfg? > I am following the existing code as was done for > test_dev_config_show_bool(), > test_dev_config_show_int(), > test_dev_config_show_u8()
Heh. Yes. Those are buggy as well. Good eyes. Could you send a patch to fix them?
regards, dan caprnter
| |