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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Nov 2016 16:45:49 +0100
From:   Peter Rosin <peda@...ntia.se>
To:     Wolfram Sang <wsa-dev@...g-engineering.com>
CC:     <linux-kernel@...r.kernel.org>,
        Peter Korsgaard <peter.korsgaard@...co.com>,
        Wolfram Sang <wsa@...-dreams.de>, <linux-i2c@...r.kernel.org>
Subject: Re: [PATCH v2] i2c: i2c-mux-gpio: update mux with
 gpiod_set_array_value_cansleep

On 2016-11-24 16:14, Wolfram Sang wrote:
> Hi Peter,
> 
>> +	int values[mux->data.n_gpios];
> 
> Hmm, my code checkers complain about this line:
> 
>   CHECK   drivers/i2c/muxes/i2c-mux-gpio.c
>     SPARSE
> drivers/i2c/muxes/i2c-mux-gpio.c:29:29: warning: Variable length array is used.
>     SMATCH
> drivers/i2c/muxes/i2c-mux-gpio.c:29:29: warning: Variable length array is used.
> 
> Worth to fix it?

Yes, especially since I spotted an unrelated bug in my patch.
Regarding this though, I just thought (smallish) variable length
arrays were ok. But I guess smallish isn't very exact...

> BTW (unrelated to your patch), the compiler complains about:
> 
> In file included from drivers/i2c/muxes/i2c-mux-gpio.c:18:0:
> drivers/i2c/muxes/../../gpio/gpiolib.h:88:27: warning: ‘gpio_suffixes’ defined but not used [-Wunused-const-variable=]
>  static const char * const gpio_suffixes[] = { "gpios", "gpio" };
> 
> which pointed out this line to me:
> 
>  18 #include "../../gpio/gpiolib.h"
> 
> which is probably worth fixing, too?

Yes, I never liked that include, but I don't know how to get
from struct gpio_desc * to the relevant struct device *
without it...

It's this line that needs it:

	gpio_dev = &gpio_dec->gdev->dev;

If you can replace it with something neater, go for it!

Cheers,
Peter

Powered by blists - more mailing lists