Message ID | 20221205103550.24944-2-Divya.Koppera@microchip.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Fixed warnings | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 9 of 9 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | Fixes tag looks correct |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On Mon, Dec 05, 2022 at 04:05:49PM +0530, Divya Koppera wrote: > Initialized return variable > > Fixes Old smatch warnings: > drivers/net/phy/micrel.c:1750 ksz886x_cable_test_get_status() error: > uninitialized symbol 'ret'. I guess this patch has been rebased without the smatch warning being changed because line 1750 in net-next/main is a blank line between two functions. > Reported-by: kernel test robot <lkp@intel.com> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > Fixes: 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814 phy") > Signed-off-by: Divya Koppera <Divya.Koppera@microchip.com> So once i looked in the correct place: Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
Hi Andrew, > -----Original Message----- > From: Andrew Lunn <andrew@lunn.ch> > Sent: Monday, December 5, 2022 7:07 PM > To: Divya Koppera - I30481 <Divya.Koppera@microchip.com> > Cc: hkallweit1@gmail.com; linux@armlinux.org.uk; davem@davemloft.net; > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; > richardcochran@gmail.com; UNGLinuxDriver > <UNGLinuxDriver@microchip.com>; Madhuri Sripada - I34878 > <Madhuri.Sripada@microchip.com> > Subject: Re: [PATCH v4 net-next 1/2] net: phy: micrel: Fixed error related to > uninitialized symbol ret > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, Dec 05, 2022 at 04:05:49PM +0530, Divya Koppera wrote: > > Initialized return variable > > > > Fixes Old smatch warnings: > > drivers/net/phy/micrel.c:1750 ksz886x_cable_test_get_status() error: > > uninitialized symbol 'ret'. > > I guess this patch has been rebased without the smatch warning being > changed because line 1750 in net-next/main is a blank line between two > functions. > Yes, rebased without fix. > > Reported-by: kernel test robot <lkp@intel.com> > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > Fixes: 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814 > > phy") > > Signed-off-by: Divya Koppera <Divya.Koppera@microchip.com> > > So once i looked in the correct place: > > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > > Andrew
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 26ce0c5defcd..1bcdb828db56 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2088,7 +2088,8 @@ static int ksz886x_cable_test_get_status(struct phy_device *phydev, const struct kszphy_type *type = phydev->drv->driver_data; unsigned long pair_mask = type->pair_mask; int retries = 20; - int pair, ret; + int ret = 0; + int pair; *finished = false;
Initialized return variable Fixes Old smatch warnings: drivers/net/phy/micrel.c:1750 ksz886x_cable_test_get_status() error: uninitialized symbol 'ret'. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814 phy") Signed-off-by: Divya Koppera <Divya.Koppera@microchip.com> --- v3 -> v4: - Split the patch for different warnings. v1 -> v3: - No changes --- drivers/net/phy/micrel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)