Re: [PATCH v2 3/7] test_firmware: add partial read support for request_firmware_into_buf

From: Dan Carpenter
Date: Mon Feb 24 2020 - 06:25:42 EST


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