Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-24 Thread Geert Uytterhoeven
On Sat, Sep 24, 2016 at 11:15 AM, Wolfram Sang wrote: >> drivers/gpio/gpio-pca953x.c | 2 ++ >> 1 file changed, 2 insertions(+) > > FYI, my code checkers found this in this driver: > > SMATCH > drivers/gpio/gpio-pca953x.c:562 pca953x_irq_pending() error: buffer overflow

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-24 Thread Geert Uytterhoeven
On Sat, Sep 24, 2016 at 11:15 AM, Wolfram Sang wrote: >> drivers/gpio/gpio-pca953x.c | 2 ++ >> 1 file changed, 2 insertions(+) > > FYI, my code checkers found this in this driver: > > SMATCH > drivers/gpio/gpio-pca953x.c:562 pca953x_irq_pending() error: buffer overflow > 'cur_stat' 5 <=

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-24 Thread Wolfram Sang
> drivers/gpio/gpio-pca953x.c | 2 ++ > 1 file changed, 2 insertions(+) FYI, my code checkers found this in this driver: SMATCH drivers/gpio/gpio-pca953x.c:562 pca953x_irq_pending() error: buffer overflow 'cur_stat' 5 <= 8191 drivers/gpio/gpio-pca953x.c:573 pca953x_irq_pending() warn:

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-24 Thread Wolfram Sang
> drivers/gpio/gpio-pca953x.c | 2 ++ > 1 file changed, 2 insertions(+) FYI, my code checkers found this in this driver: SMATCH drivers/gpio/gpio-pca953x.c:562 pca953x_irq_pending() error: buffer overflow 'cur_stat' 5 <= 8191 drivers/gpio/gpio-pca953x.c:573 pca953x_irq_pending() warn:

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-24 Thread Wolfram Sang
On Fri, Sep 23, 2016 at 10:10:57AM +0200, Linus Walleij wrote: > On Wed, Sep 21, 2016 at 7:45 AM, Wolfram Sang wrote: > > >> In order to get rid of the warning, retrieve the adapter nesting depth > >> and use it as lockdep subclass for chip->i2c_lock. > >> > >> Signed-off-by:

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-24 Thread Wolfram Sang
On Fri, Sep 23, 2016 at 10:10:57AM +0200, Linus Walleij wrote: > On Wed, Sep 21, 2016 at 7:45 AM, Wolfram Sang wrote: > > >> In order to get rid of the warning, retrieve the adapter nesting depth > >> and use it as lockdep subclass for chip->i2c_lock. > >> > >> Signed-off-by: Bartosz Golaszewski

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-23 Thread Linus Walleij
On Wed, Sep 21, 2016 at 7:45 AM, Wolfram Sang wrote: >> In order to get rid of the warning, retrieve the adapter nesting depth >> and use it as lockdep subclass for chip->i2c_lock. >> >> Signed-off-by: Bartosz Golaszewski > > Linus, we'd like that

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-23 Thread Linus Walleij
On Wed, Sep 21, 2016 at 7:45 AM, Wolfram Sang wrote: >> In order to get rid of the warning, retrieve the adapter nesting depth >> and use it as lockdep subclass for chip->i2c_lock. >> >> Signed-off-by: Bartosz Golaszewski > > Linus, we'd like that in 4.9. Can I get your ack for the gpio part?

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-20 Thread Wolfram Sang
On Fri, Sep 16, 2016 at 06:02:45PM +0200, Bartosz Golaszewski wrote: > If an I2C GPIO multiplexer is driven by a GPIO provided by an expander > when there's a second expander using the same device driver on one of > the I2C bus segments, lockdep prints a deadlock warning when trying to > set the

Re: [PATCH v2 4/4] gpio: pca953x: fix an incorrect lockdep warning

2016-09-20 Thread Wolfram Sang
On Fri, Sep 16, 2016 at 06:02:45PM +0200, Bartosz Golaszewski wrote: > If an I2C GPIO multiplexer is driven by a GPIO provided by an expander > when there's a second expander using the same device driver on one of > the I2C bus segments, lockdep prints a deadlock warning when trying to > set the