mttcan: fix kernel compilation warnings

Using this patch we are fixing below kernel compilation
warnings.
nvidia-oot/drivers/net/can/mttcan/native/m_ttcan_linux.c:
In function 'mttcan_tx_complete':
nvidia-oot/drivers/net/can/mttcan/native/m_ttcan_linux.c
:619:3: warning: ignoring return value of 'can_get_echo_skb',
declared with attribute warn_unused_result [-Wunused-result]
   can_get_echo_skb(dev, msg_no, 0);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bug 3832874

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I38426d44a479eb7f87f911985bcaabc96b6b1aa1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2811270
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2022-11-17 23:09:59 +05:30
committed by mobile promotions
parent 3daf6e0d8c
commit c126c2ee93

View File

@@ -616,13 +616,12 @@ 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, 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
clear_bit(msg_no, &ttcan->tx_object); clear_bit(msg_no, &ttcan->tx_object);
stats->tx_packets++; stats->tx_packets++;
stats->tx_bytes += ttcan->tx_buf_dlc[msg_no]; stats->tx_bytes += can_get_echo_skb(dev, msg_no, 0);
completed_tx &= ~(1U << msg_no); completed_tx &= ~(1U << msg_no);
} }