From 9408892331de53d5de7736700f125cd1d96bfaa1 Mon Sep 17 00:00:00 2001 From: Manish Bhardwaj Date: Tue, 15 Nov 2022 08:16:19 +0000 Subject: [PATCH] mttcan: fix kernel compilation warnings Using this patch we are fixing below kernel compilation warnings. out/linux/arm64-defconfig-jetson-modules/nvidia-oot/drivers /net/can/mttcan/native/m_ttcan_linux.c: In function 'mttcan_start_xmit': /mlt/kernel/include/linux/stddef.h:8:14: warning: passing argument 4 of 'can_put_echo_skb' makes integer from pointer without a cast [-Wint-conversion] #define NULL ((void *)0) Bug 3832874 Change-Id: I2aa565f37494f6af39a43b389ea3e1ad7775ed44 Signed-off-by: Manish Bhardwaj Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2809373 Reviewed-by: Sandeep Trasi Reviewed-by: svcacv GVS: Gerrit_Virtual_Submit --- drivers/net/can/mttcan/native/m_ttcan_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/mttcan/native/m_ttcan_linux.c b/drivers/net/can/mttcan/native/m_ttcan_linux.c index 6a403dc1..bf13758e 100644 --- a/drivers/net/can/mttcan/native/m_ttcan_linux.c +++ b/drivers/net/can/mttcan/native/m_ttcan_linux.c @@ -616,7 +616,7 @@ static void mttcan_tx_complete(struct net_device *dev) while (completed_tx) { msg_no = ffs(completed_tx) - 1; - can_get_echo_skb(dev, msg_no, NULL); + can_get_echo_skb(dev, msg_no, 0); #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0) can_led_event(dev, CAN_LED_EVENT_TX); #endif @@ -653,7 +653,7 @@ static void mttcan_tx_cancelled(struct net_device *dev) msg_no = ffs(cancelled_msg) - 1; buff_bit = 1U << msg_no; if (ttcan->tx_object & buff_bit) { - can_free_echo_skb(dev, msg_no, NULL); + can_free_echo_skb(dev, msg_no, 0); clear_bit(msg_no, &ttcan->tx_object); cancelled_msg &= ~(buff_bit); stats->tx_aborted_errors++; @@ -1371,7 +1371,7 @@ static netdev_tx_t mttcan_start_xmit(struct sk_buff *skb, spin_unlock_bh(&priv->tx_lock); return NETDEV_TX_BUSY; } - can_put_echo_skb(skb, dev, msg_no, NULL); + can_put_echo_skb(skb, dev, msg_no, 0); /* Set go bit for non-TTCAN messages */ if (!priv->tt_param[0])