Re: [PATCH net-next 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-09 Thread Quentin Schulz
Hi Gustavo, On Tue, Oct 09, 2018 at 09:38:33PM +0200, Gustavo A. R. Silva wrote: > Currently, the error handling for the call to function > phy_read_paged() doesn't work because *reg_val* is of > type u16 (16 bits, unsigned), which makes it impossible > for it to hold a value less than 0. > Ah,

[PATCH net-next 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-09 Thread Gustavo A. R. Silva
Currently, the error handling for the call to function phy_read_paged() doesn't work because *reg_val* is of type u16 (16 bits, unsigned), which makes it impossible for it to hold a value less than 0. Fix this by changing the type of variable *reg_val* to int. Addresses-Coverity-ID: 1473970 ("Uns