kernel: bump 5.4 to 5.4.66
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 802-can-0002-can-rx-offload-fix-long-lines.patch
1 From 47058e3bd5c13b9db796a81083c049cb1d0b7883 Mon Sep 17 00:00:00 2001
2 From: Marc Kleine-Budde <mkl@pengutronix.de>
3 Date: Mon, 7 Oct 2019 09:59:49 +0200
4 Subject: [PATCH] can: rx-offload: fix long lines
5
6 This patch fixes the checkpatch warnings about too long lines.
7
8 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
9 ---
10 drivers/net/can/rx-offload.c | 39 ++++++++++++++++++++++++++-------------
11 1 file changed, 26 insertions(+), 13 deletions(-)
12
13 --- a/drivers/net/can/rx-offload.c
14 +++ b/drivers/net/can/rx-offload.c
15 @@ -1,7 +1,8 @@
16 // SPDX-License-Identifier: GPL-2.0-only
17 -/*
18 - * Copyright (c) 2014 David Jander, Protonic Holland
19 - * Copyright (C) 2014-2017 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de>
20 +/* Copyright (c) 2014 Protonic Holland,
21 + * David Jander
22 + * Copyright (C) 2014-2017 Pengutronix,
23 + * Marc Kleine-Budde <kernel@pengutronix.de>
24 */
25
26 #include <linux/can/dev.h>
27 @@ -11,14 +12,17 @@ struct can_rx_offload_cb {
28 u32 timestamp;
29 };
30
31 -static inline struct can_rx_offload_cb *can_rx_offload_get_cb(struct sk_buff *skb)
32 +static inline struct can_rx_offload_cb *
33 +can_rx_offload_get_cb(struct sk_buff *skb)
34 {
35 BUILD_BUG_ON(sizeof(struct can_rx_offload_cb) > sizeof(skb->cb));
36
37 return (struct can_rx_offload_cb *)skb->cb;
38 }
39
40 -static inline bool can_rx_offload_le(struct can_rx_offload *offload, unsigned int a, unsigned int b)
41 +static inline bool
42 +can_rx_offload_le(struct can_rx_offload *offload,
43 + unsigned int a, unsigned int b)
44 {
45 if (offload->inc)
46 return a <= b;
47 @@ -26,7 +30,8 @@ static inline bool can_rx_offload_le(str
48 return a >= b;
49 }
50
51 -static inline unsigned int can_rx_offload_inc(struct can_rx_offload *offload, unsigned int *val)
52 +static inline unsigned int
53 +can_rx_offload_inc(struct can_rx_offload *offload, unsigned int *val)
54 {
55 if (offload->inc)
56 return (*val)++;
57 @@ -36,7 +41,9 @@ static inline unsigned int can_rx_offloa
58
59 static int can_rx_offload_napi_poll(struct napi_struct *napi, int quota)
60 {
61 - struct can_rx_offload *offload = container_of(napi, struct can_rx_offload, napi);
62 + struct can_rx_offload *offload = container_of(napi,
63 + struct can_rx_offload,
64 + napi);
65 struct net_device *dev = offload->dev;
66 struct net_device_stats *stats = &dev->stats;
67 struct sk_buff *skb;
68 @@ -65,8 +72,9 @@ static int can_rx_offload_napi_poll(stru
69 return work_done;
70 }
71
72 -static inline void __skb_queue_add_sort(struct sk_buff_head *head, struct sk_buff *new,
73 - int (*compare)(struct sk_buff *a, struct sk_buff *b))
74 +static inline void
75 +__skb_queue_add_sort(struct sk_buff_head *head, struct sk_buff *new,
76 + int (*compare)(struct sk_buff *a, struct sk_buff *b))
77 {
78 struct sk_buff *pos, *insert = NULL;
79
80 @@ -199,7 +207,8 @@ can_rx_offload_offload_one(struct can_rx
81 return skb;
82 }
83
84 -int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload, u64 pending)
85 +int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload,
86 + u64 pending)
87 {
88 struct sk_buff_head skb_queue;
89 unsigned int i;
90 @@ -328,7 +337,9 @@ int can_rx_offload_queue_tail(struct can
91 }
92 EXPORT_SYMBOL_GPL(can_rx_offload_queue_tail);
93
94 -static int can_rx_offload_init_queue(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight)
95 +static int can_rx_offload_init_queue(struct net_device *dev,
96 + struct can_rx_offload *offload,
97 + unsigned int weight)
98 {
99 offload->dev = dev;
100
101 @@ -346,7 +357,8 @@ static int can_rx_offload_init_queue(str
102 return 0;
103 }
104
105 -int can_rx_offload_add_timestamp(struct net_device *dev, struct can_rx_offload *offload)
106 +int can_rx_offload_add_timestamp(struct net_device *dev,
107 + struct can_rx_offload *offload)
108 {
109 unsigned int weight;
110
111 @@ -366,7 +378,8 @@ int can_rx_offload_add_timestamp(struct
112 }
113 EXPORT_SYMBOL_GPL(can_rx_offload_add_timestamp);
114
115 -int can_rx_offload_add_fifo(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight)
116 +int can_rx_offload_add_fifo(struct net_device *dev,
117 + struct can_rx_offload *offload, unsigned int weight)
118 {
119 if (!offload->mailbox_read)
120 return -EINVAL;