Skip to content

Commit 7cae4d0

Browse files
vincent-mailholmarckleinebudde
authored andcommitted
can: ti_hecc: fix -Woverflow compiler warning
Fix below default (W=0) warning: drivers/net/can/ti_hecc.c: In function 'ti_hecc_start': drivers/net/can/ti_hecc.c:386:20: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073709551599' to '4294967279' [-Woverflow] 386 | mbx_mask = ~BIT(HECC_RX_LAST_MBOX); | ^ Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://patch.msgid.link/20250715-can-compile-test-v2-1-f7fd566db86f@wanadoo.fr Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 21e9b7d commit 7cae4d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/can/ti_hecc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static void ti_hecc_start(struct net_device *ndev)
383383
* overflows instead of the hardware silently dropping the
384384
* messages.
385385
*/
386-
mbx_mask = ~BIT(HECC_RX_LAST_MBOX);
386+
mbx_mask = ~BIT_U32(HECC_RX_LAST_MBOX);
387387
hecc_write(priv, HECC_CANOPC, mbx_mask);
388388

389389
/* Enable interrupts */

0 commit comments

Comments
 (0)