hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/drivers/net/hamradio/baycom_ser_fdx.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*****************************************************************************/
23
34 /*
....@@ -5,24 +6,9 @@
56 *
67 * Copyright (C) 1996-2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
78 *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
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
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
- *
229 * Please note that the GPL allows you to use the driver, NOT the radio.
2310 * In order to use the radio, you need a license from the communications
2411 * authority of your country.
25
- *
2612 *
2713 * Supported modems
2814 *
....@@ -52,7 +38,6 @@
5238 * iobase base address of the port; common values are 0x3f8, 0x2f8, 0x3e8, 0x2e8
5339 * baud baud rate (between 300 and 4800)
5440 * irq interrupt line of the port; common values are 4,3
55
- *
5641 *
5742 * History:
5843 * 0.1 26.06.1996 Adapted from baycom.c and made network driver interface
....@@ -202,32 +187,6 @@
202187 * Reported by: Ignacio.Arenaza@studi.epfl.ch (Ignacio Arenaza Nuno)
203188 */
204189 }
205
-
206
-/* --------------------------------------------------------------------- */
207
-
208
-#if 0
209
-static inline unsigned int hweight16(unsigned int w)
210
- __attribute__ ((unused));
211
-static inline unsigned int hweight8(unsigned int w)
212
- __attribute__ ((unused));
213
-
214
-static inline unsigned int hweight16(unsigned int w)
215
-{
216
- unsigned short res = (w & 0x5555) + ((w >> 1) & 0x5555);
217
- res = (res & 0x3333) + ((res >> 2) & 0x3333);
218
- res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F);
219
- return (res & 0x00FF) + ((res >> 8) & 0x00FF);
220
-}
221
-
222
-static inline unsigned int hweight8(unsigned int w)
223
-{
224
- unsigned short res = (w & 0x55) + ((w >> 1) & 0x55);
225
- res = (res & 0x33) + ((res >> 2) & 0x33);
226
- return (res & 0x0F) + ((res >> 4) & 0x0F);
227
-}
228
-#endif
229
-
230
-/* --------------------------------------------------------------------- */
231190
232191 static __inline__ void ser12_rx(struct net_device *dev, struct baycom_state *bc, struct timespec64 *ts, unsigned char curs)
233192 {