hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/isdn/hardware/mISDN/avmfritz.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * avm_fritz.c low level stuff for AVM FRITZ!CARD PCI ISDN cards
34 * Thanks to AVM, Berlin for informations
....@@ -5,20 +6,6 @@
56 * Author Karsten Keil <keil@isdn4linux.de>
67 *
78 * Copyright 2009 by Karsten Keil <keil@isdn4linux.de>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * 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
- *
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 */
2310 #include <linux/interrupt.h>
2411 #include <linux/module.h>
....@@ -361,7 +348,7 @@
361348 switch (protocol) {
362349 case -1: /* used for init */
363350 bch->state = -1;
364
- /* fall through */
351
+ fallthrough;
365352 case ISDN_P_NONE:
366353 if (bch->state == ISDN_P_NONE)
367354 break;
....@@ -415,8 +402,8 @@
415402 } else {
416403 cnt = bchannel_get_rxbuf(bch, count);
417404 if (cnt < 0) {
418
- pr_warning("%s.B%d: No bufferspace for %d bytes\n",
419
- fc->name, bch->nr, count);
405
+ pr_warn("%s.B%d: No bufferspace for %d bytes\n",
406
+ fc->name, bch->nr, count);
420407 return;
421408 }
422409 p = skb_put(bch->rx_skb, count);
....@@ -522,8 +509,7 @@
522509 if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len) {
523510 hdlc_fill_fifo(bch);
524511 } else {
525
- if (bch->tx_skb)
526
- dev_kfree_skb(bch->tx_skb);
512
+ dev_kfree_skb(bch->tx_skb);
527513 if (get_next_bframe(bch)) {
528514 hdlc_fill_fifo(bch);
529515 test_and_clear_bit(FLG_TX_EMPTY, &bch->Flags);
....@@ -552,8 +538,8 @@
552538 }
553539 if (stat & HDLC_INT_RPR) {
554540 if (stat & HDLC_STAT_RDO) {
555
- pr_warning("%s: ch%d stat %x RDO\n",
556
- fc->name, bch->nr, stat);
541
+ pr_warn("%s: ch%d stat %x RDO\n",
542
+ fc->name, bch->nr, stat);
557543 hdlc->ctrl.sr.xml = 0;
558544 hdlc->ctrl.sr.cmd |= HDLC_CMD_RRS;
559545 write_ctrl(bch, 1);
....@@ -575,8 +561,8 @@
575561 HDLC_STAT_CRCVFR) {
576562 recv_Bchannel(bch, 0, false);
577563 } else {
578
- pr_warning("%s: got invalid frame\n",
579
- fc->name);
564
+ pr_warn("%s: got invalid frame\n",
565
+ fc->name);
580566 skb_trim(bch->rx_skb, 0);
581567 }
582568 }
....@@ -588,8 +574,8 @@
588574 * restart transmitting the whole frame on HDLC
589575 * in transparent mode we send the next data
590576 */
591
- pr_warning("%s: ch%d stat %x XDU %s\n", fc->name, bch->nr,
592
- stat, bch->tx_skb ? "tx_skb" : "no tx_skb");
577
+ pr_warn("%s: ch%d stat %x XDU %s\n", fc->name, bch->nr,
578
+ stat, bch->tx_skb ? "tx_skb" : "no tx_skb");
593579 if (bch->tx_skb && bch->tx_skb->len) {
594580 if (!test_bit(FLG_TRANSPARENT, &bch->Flags))
595581 bch->tx_idx = 0;