Re: [PATCH net-next 2/4] net: phy: dp83869: Set opmode from straps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub

On 5/19/20 12:40 PM, Dan Murphy wrote:
Jakub

On 5/19/20 11:58 AM, Jakub Kicinski wrote:
On Tue, 19 May 2020 09:18:11 -0500 Dan Murphy wrote:
If the op-mode for the device is not set in the device tree then set
the strapped op-mode and store it for later configuration.

Signed-off-by: Dan Murphy <dmurphy@xxxxxx>
../drivers/net/phy/dp83869.c: In function0 dp83869_set_strapped_mode:
../drivers/net/phy/dp83869.c:171:10: warning: comparison is always false due to limited range of data type [-Wtype-limits]
   171 |  if (val < 0)
       |          ^

This looks to be a false positive.

phy_read_mmd will return an errno or a value from 0->15

So if errno is returned then this will be true.

Unless I have to do IS_ERR.

I did not get that warning.  But I am using 9.2-gcc.

What compiler are you using?

I see what the issue is val needs to be an int not a u16

I will fix it

Dan


Dan




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux