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] [day] [month] [year] [list]
Date: Sat, 11 May 2024 12:59:10 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Barnabás Czémán <trabarni@...il.com>, Lars-Peter
 Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>, Krzysztof
 Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, Danila Tikhonov <danila@...xyga.com>
Subject: Re: [PATCH v2 1/2] iio: imu: bmi160: add support for bmi120


> >   
> > > +       }
> > > +
> > > +       return -ENODEV;
> > > +}
> > > +
> > >  static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
> > >  {
> > >         int ret;
> > > @@ -737,12 +753,10 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
> > >                 dev_err(dev, "Error reading chip id\n");
> > >                 goto disable_regulator;
> > >         }
> > > -       if (val != BMI160_CHIP_ID_VAL) {
> > > -               dev_err(dev, "Wrong chip id, got %x expected %x\n",
> > > -                       val, BMI160_CHIP_ID_VAL);
> > > -               ret = -ENODEV;
> > > -               goto disable_regulator;
> > > -       }
> > > +
> > > +       ret = bmi160_check_chip_id(val);
> > > +       if (ret)
> > > +               dev_warn(dev, "Chip id not found: %x\n", val);    
> > 
> > This changes the error with probe failure to a warning, but the commit
> > message doesn't explain why. We always want to know why changes were
> > made. :-)
> > 
> > Should also probably be in a separate patch since changing the
> > behavior here is a separate change from adding support for a new chip.  
> True, separate patch would be ideal as maybe someone will backport this change and
> not the rest.

Given I'd already picked up v3, I added a note on this to the commit rather
than splitting it.

I doubt anyone will care about dragging in bmi120 IDs along with the relaxation
of matching if they just want the relaxation.

Jonathan

> >   
> > >
> > >         ret = bmi160_set_mode(data, BMI160_ACCEL, true);
> > >         if (ret)    
> > 
> > ...  
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ