.. | .. |
---|
1 | | -/* |
---|
2 | | - * Copyright (C) 2007, 2011 Wolfgang Grandegger <wg@grandegger.com> |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
| 2 | +/* Copyright (C) 2007, 2011 Wolfgang Grandegger <wg@grandegger.com> |
---|
3 | 3 | * Copyright (C) 2012 Stephane Grosjean <s.grosjean@peak-system.com> |
---|
4 | 4 | * |
---|
5 | 5 | * Derived from the PCAN project file driver/src/pcan_pci.c: |
---|
6 | 6 | * |
---|
7 | 7 | * Copyright (C) 2001-2006 PEAK System-Technik GmbH |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the version 2 of the GNU General Public License |
---|
11 | | - * as published by the Free Software Foundation |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | 8 | */ |
---|
18 | 9 | |
---|
19 | 10 | #include <linux/kernel.h> |
---|
.. | .. |
---|
125 | 116 | #define CANFD_CTL_IRQ_CL_DEF 16 /* Rx msg max nb per IRQ in Rx DMA */ |
---|
126 | 117 | #define CANFD_CTL_IRQ_TL_DEF 10 /* Time before IRQ if < CL (x100 µs) */ |
---|
127 | 118 | |
---|
128 | | -#define CANFD_OPTIONS_SET (CANFD_OPTION_ERROR | CANFD_OPTION_BUSLOAD) |
---|
129 | | - |
---|
130 | 119 | /* Tx anticipation window (link logical address should be aligned on 2K |
---|
131 | 120 | * boundary) |
---|
132 | 121 | */ |
---|
.. | .. |
---|
155 | 144 | __le32 irq_status; |
---|
156 | 145 | __le32 sys_time_low; |
---|
157 | 146 | __le32 sys_time_high; |
---|
158 | | - struct pucan_rx_msg msg[0]; |
---|
| 147 | + struct pucan_rx_msg msg[]; |
---|
159 | 148 | } __packed __aligned(4); |
---|
160 | 149 | |
---|
161 | 150 | /* Tx Link record */ |
---|
.. | .. |
---|
203 | 192 | struct pci_dev *pci_dev; |
---|
204 | 193 | int can_count; |
---|
205 | 194 | spinlock_t cmd_lock; /* 64-bits cmds must be atomic */ |
---|
206 | | - struct pciefd_can *can[0]; /* array of network devices */ |
---|
| 195 | + struct pciefd_can *can[]; /* array of network devices */ |
---|
207 | 196 | }; |
---|
208 | 197 | |
---|
209 | 198 | /* supported device ids. */ |
---|
.. | .. |
---|
668 | 657 | pciefd_can_writereg(priv, CANFD_CLK_SEL_80MHZ, |
---|
669 | 658 | PCIEFD_REG_CAN_CLK_SEL); |
---|
670 | 659 | |
---|
671 | | - /* fallthough */ |
---|
| 660 | + fallthrough; |
---|
672 | 661 | case CANFD_CLK_SEL_80MHZ: |
---|
673 | 662 | priv->ucan.can.clock.freq = 80 * 1000 * 1000; |
---|
674 | 663 | break; |
---|
.. | .. |
---|
849 | 838 | |
---|
850 | 839 | /* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while |
---|
851 | 840 | * the probe() function must return a negative errno in case of failure |
---|
852 | | - * (err is unchanged if negative) */ |
---|
| 841 | + * (err is unchanged if negative) |
---|
| 842 | + */ |
---|
853 | 843 | return pcibios_err_to_errno(err); |
---|
854 | 844 | } |
---|
855 | 845 | |
---|