mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
3da861ccca
Refreshed all patches. The following patches were manually changed: * 610-netfilter_match_bypass_default_checks.patch * 611-netfilter_match_bypass_default_table.patch * 802-can-0002-can-rx-offload-fix-long-lines.patch * 802-can-0003-can-rx-offload-can_rx_offload_compare-fix-typo.patch * 802-can-0004-can-rx-offload-can_rx_offload_irq_offload_timestamp-.patch * 802-can-0005-can-rx-offload-can_rx_offload_reset-remove-no-op-fun.patch * 802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch * 802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch The can-dev.ko model was moved in the upstream kernel. Compile-tested on: x86/64, armvirt/64, ath79/generic Runtime-tested on: x86/64, armvirt/64, ath79/generic Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
121 lines
4.1 KiB
Diff
121 lines
4.1 KiB
Diff
From 47058e3bd5c13b9db796a81083c049cb1d0b7883 Mon Sep 17 00:00:00 2001
|
|
From: Marc Kleine-Budde <mkl@pengutronix.de>
|
|
Date: Mon, 7 Oct 2019 09:59:49 +0200
|
|
Subject: [PATCH] can: rx-offload: fix long lines
|
|
|
|
This patch fixes the checkpatch warnings about too long lines.
|
|
|
|
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|
---
|
|
drivers/net/can/rx-offload.c | 39 ++++++++++++++++++++++++++-------------
|
|
1 file changed, 26 insertions(+), 13 deletions(-)
|
|
|
|
--- a/drivers/net/can/dev/rx-offload.c
|
|
+++ b/drivers/net/can/dev/rx-offload.c
|
|
@@ -1,7 +1,8 @@
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
-/*
|
|
- * Copyright (c) 2014 David Jander, Protonic Holland
|
|
- * Copyright (C) 2014-2017 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de>
|
|
+/* Copyright (c) 2014 Protonic Holland,
|
|
+ * David Jander
|
|
+ * Copyright (C) 2014-2017 Pengutronix,
|
|
+ * Marc Kleine-Budde <kernel@pengutronix.de>
|
|
*/
|
|
|
|
#include <linux/can/dev.h>
|
|
@@ -11,14 +12,17 @@ struct can_rx_offload_cb {
|
|
u32 timestamp;
|
|
};
|
|
|
|
-static inline struct can_rx_offload_cb *can_rx_offload_get_cb(struct sk_buff *skb)
|
|
+static inline struct can_rx_offload_cb *
|
|
+can_rx_offload_get_cb(struct sk_buff *skb)
|
|
{
|
|
BUILD_BUG_ON(sizeof(struct can_rx_offload_cb) > sizeof(skb->cb));
|
|
|
|
return (struct can_rx_offload_cb *)skb->cb;
|
|
}
|
|
|
|
-static inline bool can_rx_offload_le(struct can_rx_offload *offload, unsigned int a, unsigned int b)
|
|
+static inline bool
|
|
+can_rx_offload_le(struct can_rx_offload *offload,
|
|
+ unsigned int a, unsigned int b)
|
|
{
|
|
if (offload->inc)
|
|
return a <= b;
|
|
@@ -26,7 +30,8 @@ static inline bool can_rx_offload_le(str
|
|
return a >= b;
|
|
}
|
|
|
|
-static inline unsigned int can_rx_offload_inc(struct can_rx_offload *offload, unsigned int *val)
|
|
+static inline unsigned int
|
|
+can_rx_offload_inc(struct can_rx_offload *offload, unsigned int *val)
|
|
{
|
|
if (offload->inc)
|
|
return (*val)++;
|
|
@@ -36,7 +41,9 @@ static inline unsigned int can_rx_offloa
|
|
|
|
static int can_rx_offload_napi_poll(struct napi_struct *napi, int quota)
|
|
{
|
|
- struct can_rx_offload *offload = container_of(napi, struct can_rx_offload, napi);
|
|
+ struct can_rx_offload *offload = container_of(napi,
|
|
+ struct can_rx_offload,
|
|
+ napi);
|
|
struct net_device *dev = offload->dev;
|
|
struct net_device_stats *stats = &dev->stats;
|
|
struct sk_buff *skb;
|
|
@@ -65,8 +72,9 @@ static int can_rx_offload_napi_poll(stru
|
|
return work_done;
|
|
}
|
|
|
|
-static inline void __skb_queue_add_sort(struct sk_buff_head *head, struct sk_buff *new,
|
|
- int (*compare)(struct sk_buff *a, struct sk_buff *b))
|
|
+static inline void
|
|
+__skb_queue_add_sort(struct sk_buff_head *head, struct sk_buff *new,
|
|
+ int (*compare)(struct sk_buff *a, struct sk_buff *b))
|
|
{
|
|
struct sk_buff *pos, *insert = NULL;
|
|
|
|
@@ -199,7 +207,8 @@ can_rx_offload_offload_one(struct can_rx
|
|
return skb;
|
|
}
|
|
|
|
-int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload, u64 pending)
|
|
+int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload,
|
|
+ u64 pending)
|
|
{
|
|
struct sk_buff_head skb_queue;
|
|
unsigned int i;
|
|
@@ -328,7 +337,9 @@ int can_rx_offload_queue_tail(struct can
|
|
}
|
|
EXPORT_SYMBOL_GPL(can_rx_offload_queue_tail);
|
|
|
|
-static int can_rx_offload_init_queue(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight)
|
|
+static int can_rx_offload_init_queue(struct net_device *dev,
|
|
+ struct can_rx_offload *offload,
|
|
+ unsigned int weight)
|
|
{
|
|
offload->dev = dev;
|
|
|
|
@@ -346,7 +357,8 @@ static int can_rx_offload_init_queue(str
|
|
return 0;
|
|
}
|
|
|
|
-int can_rx_offload_add_timestamp(struct net_device *dev, struct can_rx_offload *offload)
|
|
+int can_rx_offload_add_timestamp(struct net_device *dev,
|
|
+ struct can_rx_offload *offload)
|
|
{
|
|
unsigned int weight;
|
|
|
|
@@ -366,7 +378,8 @@ int can_rx_offload_add_timestamp(struct
|
|
}
|
|
EXPORT_SYMBOL_GPL(can_rx_offload_add_timestamp);
|
|
|
|
-int can_rx_offload_add_fifo(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight)
|
|
+int can_rx_offload_add_fifo(struct net_device *dev,
|
|
+ struct can_rx_offload *offload, unsigned int weight)
|
|
{
|
|
if (!offload->mailbox_read)
|
|
return -EINVAL;
|