All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cosmin-Florin Aluchenesei <aluchenesei.cosmin-florin@nxp.com>
To: joe.hershberger@ni.com, rfried.dev@gmail.com
Cc: ioana.ciornei@nxp.com, u-boot@lists.denx.de,
	Cosmin-Florin Aluchenesei <aluchenesei.cosmin-florin@nxp.com>
Subject: [PATCH] drivers: net: aquantia: fix unsigned compared against 0
Date: Wed, 21 Jul 2021 19:13:11 +0300	[thread overview]
Message-ID: <20210721161311.153383-1-aluchenesei.cosmin-florin@nxp.com> (raw)

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@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


             reply	other threads:[~2021-07-21 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 16:13 Cosmin-Florin Aluchenesei [this message]
2021-07-22 19:14 ` [PATCH] drivers: net: aquantia: fix unsigned compared against 0 Ramon Fried
2021-07-22 19:16   ` Ramon Fried

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210721161311.153383-1-aluchenesei.cosmin-florin@nxp.com \
    --to=aluchenesei.cosmin-florin@nxp.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=joe.hershberger@ni.com \
    --cc=rfried.dev@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.