lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4.3] net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy
On Tue, 16 Aug 2022 19:17:03 +0800 Frank wrote:
> Add a driver for the motorcomm yt8521 gigabit ethernet phy. We have verified
> the driver on StarFive VisionFive development board, which is developed by
> Shanghai StarFive Technology Co., Ltd.. On the board, yt8521 gigabit ethernet
> phy works in utp mode, RGMII interface, supports 1000M/100M/10M speeds, and
> wol(magic package).

Clang reports:

drivers/net/phy/motorcomm.c:1121:6: warning: variable 'changed' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (err > 0)
^~~~~~~
drivers/net/phy/motorcomm.c:1124:47: note: uninitialized use occurs here
return genphy_check_and_restart_aneg(phydev, changed);
^~~~~~~
drivers/net/phy/motorcomm.c:1121:2: note: remove the 'if' if its condition is always true
if (err > 0)
^~~~~~~~~~~~
drivers/net/phy/motorcomm.c:1095:18: note: initialize the variable 'changed' to silence this warning
int err, changed;
^
= 0

\
 
 \ /
  Last update: 2022-08-17 05:06    [W:0.029 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site