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]
Message-ID: <c6c326442a1347d7b45d4b1bcb325fca@svr-chch-ex1.atlnz.lc>
Date:   Wed, 28 Jun 2017 21:15:15 +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 3/5] i2c: pca-platform: add devicetree awareness

On 28/06/17 21:20, Andy Shevchenko wrote:
>> +       i2c->adap.dev.of_node = np;
>> +       } else if (np) {
>> +               i2c->adap.timeout = HZ;
>> +               i2c->gpio = devm_gpiod_get_optional(&pdev->dev, "reset-gpios", GPIOD_OUT_LOW);
>> +               if (IS_ERR(i2c->gpio))
>> +                       return PTR_ERR(i2c->gpio);
>> +               of_property_read_u32_index(np, "clock-frequency", 0,
>> +                                          &i2c->algo_data.i2c_clock);
> And what prevents you to use device_property_read_*() here and get rid
> of OFstuff?
> 

Nothing particular. I think I just found more instances of parsing a 
"clock-frequency" this way. Happy to change this.

>> +#ifdef CONFIG_OF
> Better not to put it...
> 
>> +               .of_match_table = of_match_ptr(i2c_pca_of_match_table),
> ...and get rid of of_match_ptr().

So what's the current best practice with this? I gather the intent is to 
keep the kernel size down by only including the of_match tables on 
platforms that actually use a device tree. There are just shy of 1000 
instances of of_match_ptr in the current tree (a handful of which are in 
drivers/i2c). Have we now reached a point where there are more dt-aware 
platforms than unaware ones?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ