From: Dan Carpenter <dan.carpenter@oracle.com>
To: "David S. Miller" <davem@davemloft.net>,
Esben Haabendal <esben@geanix.com>
Cc: Michal Simek <michal.simek@xilinx.com>,
Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2 net-next] net: ll_temac: remove an unnecessary condition
Date: Fri, 3 May 2019 15:50:51 +0300 [thread overview]
Message-ID: <20190503125051.GG29695@mwanda> (raw)
In-Reply-To: <20190503125024.GF29695@mwanda>
The "pdata->mdio_bus_id" is unsigned so this condition is always true.
This patch just removes it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/xilinx/ll_temac_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/xilinx/ll_temac_mdio.c b/drivers/net/ethernet/xilinx/ll_temac_mdio.c
index c2a11703bc6d..a4667326f745 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_mdio.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_mdio.c
@@ -99,7 +99,7 @@ int temac_mdio_setup(struct temac_local *lp, struct platform_device *pdev)
of_address_to_resource(np, 0, &res);
snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx",
(unsigned long long)res.start);
- } else if (pdata && pdata->mdio_bus_id >= 0) {
+ } else if (pdata) {
snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx",
pdata->mdio_bus_id);
}
--
2.18.0
next prev parent reply other threads:[~2019-05-03 12:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 12:50 [PATCH 1/2 net-next] net: ll_temac: Fix an NULL vs IS_ERR() check in temac_open() Dan Carpenter
2019-05-03 12:50 ` Dan Carpenter [this message]
2019-05-05 17:29 ` [PATCH 2/2 net-next] net: ll_temac: remove an unnecessary condition David Miller
2019-05-05 17:29 ` [PATCH 1/2 net-next] net: ll_temac: Fix an NULL vs IS_ERR() check in temac_open() David Miller
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=20190503125051.GG29695@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=esben@geanix.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).