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:   Sun, 03 Nov 2019 19:26:01 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     andrew@...n.ch
Cc:     netdev@...r.kernel.org, dan.carpenter@...cle.com
Subject: Re: [PATCH v2 net-next] net: of_get_phy_mode: Change API to solve
 int/unit warnings

From: Andrew Lunn <andrew@...n.ch>
Date: Fri,  1 Nov 2019 23:07:56 +0100

> Before this change of_get_phy_mode() returned an enum,
> phy_interface_t. On error, -ENODEV etc, is returned. If the result of
> the function is stored in a variable of type phy_interface_t, and the
> compiler has decided to represent this as an unsigned int, comparision
> with -ENODEV etc, is a signed vs unsigned comparision.
> 
> Fix this problem by changing the API. Make the function return an
> error, or 0 on success, and pass a pointer, of type phy_interface_t,
> where the phy mode should be stored.
> 
> v2:
> Return with *interface set to PHY_INTERFACE_MODE_NA on error.
> Add error checks to all users of of_get_phy_mode()
> Fixup a few reverse christmas tree errors
> Fixup a few slightly malformed reverse christmas trees
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>

Applied, thanks Andrew.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ