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]
Message-ID: <cab1dd65-e746-d861-3aef-696294bf496b@linux.ibm.com>
Date:   Mon, 8 Jun 2020 13:12:02 -0500
From:   Eddie James <eajames@...ux.ibm.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     linux-i2c <linux-i2c@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        wsa@...nel.org, Joel Stanley <joel@....id.au>
Subject: Re: [PATCH 2/2] i2c: fsi: Prevent adding adapters for ports without
 dts nodes


On 6/8/20 11:31 AM, Andy Shevchenko wrote:
> On Mon, Jun 8, 2020 at 7:05 PM Eddie James <eajames@...ux.ibm.com> wrote:
>> Ports should be defined in the devicetree if they are to be enabled on
>> the system.
> ...
>
>>          for (port_no = 0; port_no < ports; port_no++) {
>>                  np = fsi_i2c_find_port_of_node(dev->of_node, port_no);
>> -               if (np && !of_device_is_available(np))
>> +               /* Do not add port if it is not described in the device tree */
>> +               if (!np)
>> +                       continue;
> I believe this is redundant, since below will do the same second time.


Good point, thanks, I'll update that.


>
>> +               /* Do not add port if it is described as disabled */
>> +               if (!of_device_is_available(np))
>>                          continue;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ