[PATCH] drivers: net: aquantia: fix unsigned compared against 0

Ramon Fried rfried.dev at gmail.com
Thu Jul 22 21:16:06 CEST 2021


On Thu, Jul 22, 2021 at 10:14 PM Ramon Fried <rfried.dev at gmail.com> wrote:
>
> On Wed, Jul 21, 2021 at 7:13 PM Cosmin-Florin Aluchenesei
> <aluchenesei.cosmin-florin at nxp.com> wrote:
> >
> > Change the reg variable to not be unsigned so that we not get into an
> > unsigned compared against 0.
> >
> > Signed-off-by: Cosmin-Florin Aluchenesei <aluchenesei.cosmin-florin at nxp.com>
> > ---
> >  drivers/net/phy/aquantia.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
> > index 9061afa620..d3d35a75d0 100644
> > --- a/drivers/net/phy/aquantia.c
> > +++ b/drivers/net/phy/aquantia.c
> > @@ -3,7 +3,7 @@
> >   * Aquantia PHY drivers
> >   *
> >   * Copyright 2014 Freescale Semiconductor, Inc.
> > - * Copyright 2018 NXP
> > + * Copyright 2018, 2021 NXP
> >   */
> >  #include <config.h>
> >  #include <common.h>
> > @@ -554,8 +554,9 @@ int aquantia_config(struct phy_device *phydev)
> >
> >  int aquantia_startup(struct phy_device *phydev)
> >  {
> > -       u32 reg, speed;
> > +       u32 speed;
> >         int i = 0;
> > +       int reg;
> >
> >         phydev->duplex = DUPLEX_FULL;
> >
> > --
> > 2.21.0
> >
> Reviewed-by: Ramon Fried <rfried.dev at gmail.com>
Applied to u-boot-net/network-master
Thanks,
Ramon.


More information about the U-Boot mailing list