lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1326711025-6629-1-git-send-email-realmz6@gmail.com>
Date:	Mon, 16 Jan 2012 18:50:24 +0800
From:	Steven Miao <realmz6@...il.com>
To:	<wg@...ndegger.com>, <mkl@...gutronix.de>
CC:	Steven Miao <realmz6@...il.com>,
	"open list:CAN NETWORK DRIVERS" <linux-can@...r.kernel.org>,
	"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: [PATCH] socket-can: bit-timing calculation

just use first found best bit rate prescaler

Signed-off-by: Steven Miao <realmz6@...il.com>
---
 drivers/net/can/dev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 25695bd..9d4afe6 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -106,7 +106,7 @@ static int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt)
 		/* tseg brp biterror */
 		if (error < 0)
 			error = -error;
-		if (error > best_error)
+		if (error >= best_error)
 			continue;
 		best_error = error;
 		if (error == 0) {
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ