summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2021-10-13 16:00:10 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-10-24 17:24:28 +0300
commite346290439609a8ac67122418ca2efbad8d0a7e7 (patch)
tree71fae88d60932eef1a9696e2e10372d5c0c51baa /drivers
parent9b44a927e195087ff04fa7fcd3c3b08015db0d1c (diff)
downloadlinux-e346290439609a8ac67122418ca2efbad8d0a7e7.tar.xz
can: bittiming: can_fixup_bittiming(): change type of tseg1 and alltseg to unsigned int
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/dev/bittiming.c2
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;