Skip to content

Commit 7457e91

Browse files
Denis Kirjanovdavem330
authored andcommitted
ns83820: Remove unused have_optical variable.
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d1fb627 commit 7457e91

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/net/ns83820.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,6 @@ static int ns83820_get_settings(struct net_device *ndev,
12461246
{
12471247
struct ns83820 *dev = PRIV(ndev);
12481248
u32 cfg, tanar, tbicr;
1249-
int have_optical = 0;
12501249
int fullduplex = 0;
12511250

12521251
/*
@@ -1267,15 +1266,7 @@ static int ns83820_get_settings(struct net_device *ndev,
12671266
tanar = readl(dev->base + TANAR);
12681267
tbicr = readl(dev->base + TBICR);
12691268

1270-
if (dev->CFG_cache & CFG_TBI_EN) {
1271-
/* we have an optical interface */
1272-
have_optical = 1;
1273-
fullduplex = (cfg & CFG_DUPSTS) ? 1 : 0;
1274-
1275-
} else {
1276-
/* We have copper */
1277-
fullduplex = (cfg & CFG_DUPSTS) ? 1 : 0;
1278-
}
1269+
fullduplex = (cfg & CFG_DUPSTS) ? 1 : 0;
12791270

12801271
cmd->supported = SUPPORTED_Autoneg;
12811272

0 commit comments

Comments
 (0)