mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
can: bittiming: can_fixup_bittiming(): change type of tseg1 and alltseg to unsigned int
[ Upstream commit e346290439 ]
All timing calculation is done with unsigned integers, so change type
of tseg1 and alltseg to unsigned int, too.
Link: https://lore.kernel.org/all/20211013130653.1513627-1-mkl@pengutronix.de
Link: https://github.com/linux-can/can-utils/pull/314
Reported-by: Gary Bisson <bisson.gary@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7b697bb860
commit
af6f6ff3a7
|
|
@ -209,7 +209,7 @@ static int can_fixup_bittiming(struct net_device *dev, struct can_bittiming *bt,
|
|||
const struct can_bittiming_const *btc)
|
||||
{
|
||||
struct can_priv *priv = netdev_priv(dev);
|
||||
int tseg1, alltseg;
|
||||
unsigned int tseg1, alltseg;
|
||||
u64 brp64;
|
||||
|
||||
tseg1 = bt->prop_seg + bt->phase_seg1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user