All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] can: dev: remove unused variable from can_calc_bittiming() function
@ 2014-08-07  8:17 Lad, Prabhakar
  2014-08-15  8:37 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Lad, Prabhakar @ 2014-08-07  8:17 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, linux-can
  Cc: netdev, linux-kernel, Lad, Prabhakar

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>
---
 drivers/net/can/dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index e318e87..56e1069 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;
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] can: dev: remove unused variable from can_calc_bittiming() function
  2014-08-07  8:17 [PATCH] can: dev: remove unused variable from can_calc_bittiming() function Lad, Prabhakar
@ 2014-08-15  8:37 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2014-08-15  8:37 UTC (permalink / raw)
  To: Lad, Prabhakar, Wolfgang Grandegger, linux-can; +Cc: netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

On 08/07/2014 10:17 AM, Lad, Prabhakar wrote:
> 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>

Applied to can-next.

Thanks,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-15  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  8:17 [PATCH] can: dev: remove unused variable from can_calc_bittiming() function Lad, Prabhakar
2014-08-15  8:37 ` Marc Kleine-Budde

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.