summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/dev.c
diff options
context:
space:
mode:
authorLad, Prabhakar <prabhakar.csengg@gmail.com>2014-08-07 10:17:24 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-08-18 01:03:42 +0200
commitb25a437206ed5d45087bc40bd48bc34ce3bfa008 (patch)
treebfe093ef82acf8de71dbde6a1269d6fdd87d149b /drivers/net/can/dev.c
parentcan: rcar_can: add device tree support (diff)
downloadlinux-b25a437206ed5d45087bc40bd48bc34ce3bfa008.tar.xz
linux-b25a437206ed5d45087bc40bd48bc34ce3bfa008.zip
can: dev: remove unused variable from can_calc_bittiming() function
this patch removes best_rate variable from can_calc_bittiming() function which was set but was never used. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/dev.c')
-rw-r--r--drivers/net/can/dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 9f91fcba43f8..02492d241e4c 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -103,11 +103,11 @@ static int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,
const struct can_bittiming_const *btc)
{
struct can_priv *priv = netdev_priv(dev);
- long rate, best_rate = 0;
long best_error = 1000000000, error = 0;
int best_tseg = 0, best_brp = 0, brp = 0;
int tsegall, tseg = 0, tseg1 = 0, tseg2 = 0;
int spt_error = 1000, spt = 0, sampl_pt;
+ long rate;
u64 v64;
/* Use CIA recommended sample points */
@@ -152,7 +152,6 @@ static int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,
}
best_tseg = tseg / 2;
best_brp = brp;
- best_rate = rate;
if (error == 0)
break;
}