.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * avm_fritz.c low level stuff for AVM FRITZ!CARD PCI ISDN cards |
---|
3 | 4 | * Thanks to AVM, Berlin for informations |
---|
.. | .. |
---|
5 | 6 | * Author Karsten Keil <keil@isdn4linux.de> |
---|
6 | 7 | * |
---|
7 | 8 | * 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 | | - * |
---|
22 | 9 | */ |
---|
23 | 10 | #include <linux/interrupt.h> |
---|
24 | 11 | #include <linux/module.h> |
---|
.. | .. |
---|
361 | 348 | switch (protocol) { |
---|
362 | 349 | case -1: /* used for init */ |
---|
363 | 350 | bch->state = -1; |
---|
364 | | - /* fall through */ |
---|
| 351 | + fallthrough; |
---|
365 | 352 | case ISDN_P_NONE: |
---|
366 | 353 | if (bch->state == ISDN_P_NONE) |
---|
367 | 354 | break; |
---|
.. | .. |
---|
415 | 402 | } else { |
---|
416 | 403 | cnt = bchannel_get_rxbuf(bch, count); |
---|
417 | 404 | 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); |
---|
420 | 407 | return; |
---|
421 | 408 | } |
---|
422 | 409 | p = skb_put(bch->rx_skb, count); |
---|
.. | .. |
---|
522 | 509 | if (bch->tx_skb && bch->tx_idx < bch->tx_skb->len) { |
---|
523 | 510 | hdlc_fill_fifo(bch); |
---|
524 | 511 | } else { |
---|
525 | | - if (bch->tx_skb) |
---|
526 | | - dev_kfree_skb(bch->tx_skb); |
---|
| 512 | + dev_kfree_skb(bch->tx_skb); |
---|
527 | 513 | if (get_next_bframe(bch)) { |
---|
528 | 514 | hdlc_fill_fifo(bch); |
---|
529 | 515 | test_and_clear_bit(FLG_TX_EMPTY, &bch->Flags); |
---|
.. | .. |
---|
552 | 538 | } |
---|
553 | 539 | if (stat & HDLC_INT_RPR) { |
---|
554 | 540 | 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); |
---|
557 | 543 | hdlc->ctrl.sr.xml = 0; |
---|
558 | 544 | hdlc->ctrl.sr.cmd |= HDLC_CMD_RRS; |
---|
559 | 545 | write_ctrl(bch, 1); |
---|
.. | .. |
---|
575 | 561 | HDLC_STAT_CRCVFR) { |
---|
576 | 562 | recv_Bchannel(bch, 0, false); |
---|
577 | 563 | } else { |
---|
578 | | - pr_warning("%s: got invalid frame\n", |
---|
579 | | - fc->name); |
---|
| 564 | + pr_warn("%s: got invalid frame\n", |
---|
| 565 | + fc->name); |
---|
580 | 566 | skb_trim(bch->rx_skb, 0); |
---|
581 | 567 | } |
---|
582 | 568 | } |
---|
.. | .. |
---|
588 | 574 | * restart transmitting the whole frame on HDLC |
---|
589 | 575 | * in transparent mode we send the next data |
---|
590 | 576 | */ |
---|
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"); |
---|
593 | 579 | if (bch->tx_skb && bch->tx_skb->len) { |
---|
594 | 580 | if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) |
---|
595 | 581 | bch->tx_idx = 0; |
---|