public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
* [mkl-can-next:testing 9/14] drivers/net/can/flexcan.c:1262 flexcan_open() warn: should '1 << (priv->tx_mb_idx)' be a 64 bit type?
@ 2019-03-05 12:39 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-03-05 12:39 UTC (permalink / raw)
  To: kbuild, Marc Kleine-Budde; +Cc: kbuild-all, linux-can

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
head:   3871ad024254a4ee2b330b52b15a5f3fb5ae077b
commit: c0ba9ac65ff1850978b6181318366814bcc5f1c8 [9/14] can: flexcan: introduce struct flexcan_priv::tx_mask and make use of it

smatch warnings:
drivers/net/can/flexcan.c:1262 flexcan_open() warn: should '1 << (priv->tx_mb_idx)' be a 64 bit type?

# https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/commit/?id=c0ba9ac65ff1850978b6181318366814bcc5f1c8
git remote add mkl-can-next https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
git remote update mkl-can-next
git checkout c0ba9ac65ff1850978b6181318366814bcc5f1c8
vim +1262 drivers/net/can/flexcan.c

0517961cc Pankaj Bansal     2018-11-23  1250  	priv->mb_size = sizeof(struct flexcan_mb) + CAN_MAX_DLEN;
6cbf76028 Pankaj Bansal     2018-08-28  1251  	priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
6cbf76028 Pankaj Bansal     2018-08-28  1252  			 (sizeof(priv->regs->mb[1]) / priv->mb_size);
0517961cc Pankaj Bansal     2018-11-23  1253  
5156c7b11 Pankaj Bansal     2018-08-13  1254  	if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP)
0517961cc Pankaj Bansal     2018-11-23  1255  		priv->tx_mb_reserved =
0517961cc Pankaj Bansal     2018-11-23  1256  			flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_TIMESTAMP);
5156c7b11 Pankaj Bansal     2018-08-13  1257  	else
0517961cc Pankaj Bansal     2018-11-23  1258  		priv->tx_mb_reserved =
0517961cc Pankaj Bansal     2018-11-23  1259  			flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO);
0517961cc Pankaj Bansal     2018-11-23  1260  	priv->tx_mb_idx = priv->mb_count - 1;
0517961cc Pankaj Bansal     2018-11-23  1261  	priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
c0ba9ac65 Marc Kleine-Budde 2019-03-01 @1262  	priv->tx_mask = FLEXCAN_IFLAG_MB(priv->tx_mb_idx);
                                                ^^^^^^^^^^^^^
Presumably ->tx_mask is a u64?  Could it be made an unsigned long
instead?

5156c7b11 Pankaj Bansal     2018-08-13  1263  
5156c7b11 Pankaj Bansal     2018-08-13  1264  	priv->offload.mailbox_read = flexcan_mailbox_read;
5156c7b11 Pankaj Bansal     2018-08-13  1265  

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-05 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-05 12:39 [mkl-can-next:testing 9/14] drivers/net/can/flexcan.c:1262 flexcan_open() warn: should '1 << (priv->tx_mb_idx)' be a 64 bit type? Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox