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:   Wed, 28 Jun 2017 21:25:11 +0000
From:   Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Wolfram Sang <wsa@...-dreams.de>, Rob Herring <robh+dt@...nel.org>,
        linux-i2c <linux-i2c@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/5] i2c: pca-platform: switch to struct gpio_desc

On 28/06/17 21:25, Andy Shevchenko wrote:
> On Mon, Jun 26, 2017 at 3:44 AM, Chris Packham
> <chris.packham@...iedtelesis.co.nz> wrote:
>> Make use of struct gpio_desc which allows us to specify the active state
>> of the reset pin.
> 
>> +               if (gpio_is_valid(platform_data->gpio)) {
> 
> No way, it should be provided by GPIO lookup table.
> 

Can do. The only platform that would be affected is 
arch/sh/boards/board-sh7785lcr.c and the fact that it sets gpio = 0 
makes me think that this might be an error.

>> +                       ret = devm_gpio_request_one(&pdev->dev,
>> +                                                   platform_data->gpio,
>> +                                                   GPIOF_ACTIVE_LOW,
>> +                                                   i2c->adap.name);
>> +                       if (ret == 0) {
>> +                               i2c->gpio = gpio_to_desc(platform_data->gpio);
> 
> This has to be devm_gpiod_get() instead.

I can just make the devm_gpiod_get_optional() call I add in 3/5 
unconditional.

> 
> Wolfram, I suggested to drop the series for now and wait for improvements.
> 

Wolframs call. I don't mind either way. I can send a v4 or send a new 
series on top of i2c.git#for-next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ