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:   Mon, 30 Oct 2017 11:46:57 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next 3/7] net: dsa: get port type at parse time

On 10/30/2017 11:46 AM, Vivien Didelot wrote:
> Hi Florian,
> 
> Florian Fainelli <f.fainelli@...il.com> writes:
> 
>> Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
>>
>> One nit below:
>>
>>>  static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn)
>>>  {
>>> +	struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0);
>>> +	struct device_node *link = of_parse_phandle(dn, "link", 0);
>>> +
>>> +	if (ethernet) {
>>> +		dp->type = DSA_PORT_TYPE_CPU;
>>> +	} else if (link) {
>>> +		dp->type = DSA_PORT_TYPE_DSA;
>>> +	} else {
>>> +		dp->type = DSA_PORT_TYPE_USER;
>>> +	}
>>> +
>>
>> The curly braces are probably not necessary since all of these are
>> single line statements.
> 
> I didn't mention it in the commit message because it was obvious that
> the next patches will extend these condition arms.

Fair enough then ;)
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ