diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-10-13 16:00:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-18 21:16:19 +0300 |
commit | af6f6ff3a78c005b37aaa3ff31840fb13f2e51db (patch) | |
tree | 267d996b66dd5cc723a146e371ef9261f6e6ba8c /drivers/net/can | |
parent | 7b697bb86020d5e3ec255ecfa0f6f79628cf1823 (diff) | |
download | linux-af6f6ff3a78c005b37aaa3ff31840fb13f2e51db.tar.xz |
can: bittiming: can_fixup_bittiming(): change type of tseg1 and alltseg to unsigned int
[ Upstream commit e346290439609a8ac67122418ca2efbad8d0a7e7 ]
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>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/dev/bittiming.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/dev/bittiming.c b/drivers/net/can/dev/bittiming.c index f49170eadd54..b1b5a82f0829 100644 --- a/drivers/net/can/dev/bittiming.c +++ b/drivers/net/can/dev/bittiming.c @@ -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; |