hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/hamradio/baycom_epp.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*****************************************************************************/
23
34 /*
....@@ -6,24 +7,9 @@
67 * Copyright (C) 1998-2000
78 * Thomas Sailer (sailer@ife.ee.ethz.ch)
89 *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
- *
2310 * Please note that the GPL allows you to use the driver, NOT the radio.
2411 * In order to use the radio, you need a license from the communications
2512 * authority of your country.
26
- *
2713 *
2814 * History:
2915 * 0.1 xx.xx.1998 Initial version by Matthias Welwarsky (dg2fef)
....@@ -35,7 +21,6 @@
3521 * removed some pre-2.2 kernel compatibility cruft
3622 * 0.6 10.08.1999 Check if parport can do SPP and is safe to access during interrupt contexts
3723 * 0.7 12.02.2000 adapted to softnet driver interface
38
- *
3924 */
4025
4126 /*****************************************************************************/
....@@ -515,8 +500,9 @@
515500 }
516501 break;
517502 }
503
+ fallthrough;
518504
519
- default: /* fall through */
505
+ default:
520506 if (bc->hdlctx.calibrate <= 0)
521507 return 0;
522508 i = min_t(int, cnt, bc->hdlctx.calibrate);
....@@ -772,7 +758,7 @@
772758 * ===================== network driver interface =========================
773759 */
774760
775
-static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev)
761
+static netdev_tx_t baycom_send_packet(struct sk_buff *skb, struct net_device *dev)
776762 {
777763 struct baycom_state *bc = netdev_priv(dev);
778764
....@@ -975,8 +961,7 @@
975961 parport_write_control(pp, 0); /* reset the adapter */
976962 parport_release(bc->pdev);
977963 parport_unregister_device(bc->pdev);
978
- if (bc->skb)
979
- dev_kfree_skb(bc->skb);
964
+ dev_kfree_skb(bc->skb);
980965 bc->skb = NULL;
981966 printk(KERN_INFO "%s: close epp at iobase 0x%lx irq %u\n",
982967 bc_drvname, dev->base_addr, dev->irq);