Re: [PATCH 1/3] iio: as3935: Remove unnecessary cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Dec 2021 00:13:49 +0200
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Thursday, December 9, 2021, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> 
> > `buf` is cast to a const char *, but `buf` is already a const char *, so
> > the case is unnecessary.
> >
> > Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
> > ---
> >  drivers/iio/proximity/as3935.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/
> > as3935.c
> > index d62766b6b39e..51f4f92ae84a 100644
> > --- a/drivers/iio/proximity/as3935.c
> > +++ b/drivers/iio/proximity/as3935.c
> > @@ -133,7 +133,7 @@ static ssize_t as3935_sensor_sensitivity_store(struct
> > device *dev,
> >         unsigned long val;
> >         int ret;
> >
> > -       ret = kstrtoul((const char *) buf, 10, &val);
> > +       ret = kstrtoul(buf, 10, &val);
> >         if (ret)
> >                 return -EINVAL;  
> 
> 
> 
> A bit out of scope, but this eventually should be
> 
Agreed this could do with a follow up, as should the other one you
point out, but in the spirit of single purpose series I've applied
this set to the togreg branch of iio.git - pushed out as testing
and look forward to the follow ups ;)

Jonathan

>   return ret;
> 
> 
> 
> >
> > --
> > 2.30.2
> >
> >  
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux