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 <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2809373
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2022-11-15 08:16:19 +00:00
committed by mobile promotions
parent 7f81325068
commit 9408892331

View File

@@ -616,7 +616,7 @@ static void mttcan_tx_complete(struct net_device *dev)
while (completed_tx) { while (completed_tx) {
msg_no = ffs(completed_tx) - 1; 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) #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0)
can_led_event(dev, CAN_LED_EVENT_TX); can_led_event(dev, CAN_LED_EVENT_TX);
#endif #endif
@@ -653,7 +653,7 @@ static void mttcan_tx_cancelled(struct net_device *dev)
msg_no = ffs(cancelled_msg) - 1; msg_no = ffs(cancelled_msg) - 1;
buff_bit = 1U << msg_no; buff_bit = 1U << msg_no;
if (ttcan->tx_object & buff_bit) { 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); clear_bit(msg_no, &ttcan->tx_object);
cancelled_msg &= ~(buff_bit); cancelled_msg &= ~(buff_bit);
stats->tx_aborted_errors++; 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); spin_unlock_bh(&priv->tx_lock);
return NETDEV_TX_BUSY; 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 */ /* Set go bit for non-TTCAN messages */
if (!priv->tt_param[0]) if (!priv->tt_param[0])