77cc9f8e1cd90fee5253184436ece240f2cc6288
[openwrt/staging/linusw.git] /
1 From b95cae85e913fb13f4c8f1241be85725e4dffeed Mon Sep 17 00:00:00 2001
2 From: Marc Kleine-Budde <mkl@pengutronix.de>
3 Date: Mon, 7 Oct 2019 10:00:52 +0200
4 Subject: [PATCH] can: rx-offload: can_rx_offload_irq_offload_timestamp():
5 don't use assignment in if condition
6
7 This patch moves the assignment of queue_len out of the if condition.
8
9 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 ---
11 drivers/net/can/rx-offload.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14 --- a/drivers/net/can/rx-offload.c
15 +++ b/drivers/net/can/rx-offload.c
16 @@ -238,8 +238,8 @@ int can_rx_offload_irq_offload_timestamp
17 skb_queue_splice_tail(&skb_queue, &offload->skb_queue);
18 spin_unlock_irqrestore(&offload->skb_queue.lock, flags);
19
20 - if ((queue_len = skb_queue_len(&offload->skb_queue)) >
21 - (offload->skb_queue_len_max / 8))
22 + queue_len = skb_queue_len(&offload->skb_queue);
23 + if (queue_len > offload->skb_queue_len_max / 8)
24 netdev_dbg(offload->dev, "%s: queue_len=%d\n",
25 __func__, queue_len);
26