hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/atm/firestream.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12
23 /* drivers/atm/firestream.c - FireStream 155 (MB86697) and
34 * FireStream 50 (MB86695) device driver
....@@ -9,22 +10,6 @@
910 */
1011
1112 /*
12
- This program is free software; you can redistribute it and/or modify
13
- it under the terms of the GNU General Public License as published by
14
- the Free Software Foundation; either version 2 of the License, or
15
- (at your option) any later version.
16
-
17
- This program is distributed in the hope that it will be useful,
18
- but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- GNU General Public License for more details.
21
-
22
- You should have received a copy of the GNU General Public License
23
- along with this program; if not, write to the Free Software
24
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
-
26
- The GNU GPL is contained in /usr/doc/copyright/GPL on a Debian
27
- system and in the file COPYING in the Linux kernel source.
2813 */
2914
3015
....@@ -726,7 +711,7 @@
726711
727712 switch (STATUS_CODE (qe)) {
728713 case 0x01: /* This is for AAL0 where we put the chip in streaming mode */
729
- /* Fall through */
714
+ fallthrough;
730715 case 0x02:
731716 /* Process a real txdone entry. */
732717 tmp = qe->p0;
....@@ -1089,7 +1074,7 @@
10891074 RC_FLAGS_BFPS_BFP * bfp |
10901075 RC_FLAGS_RXBM_PSB, 0, 0);
10911076 break;
1092
- };
1077
+ }
10931078 if (IS_FS50 (dev)) {
10941079 submit_command (dev, &dev->hp_txq,
10951080 QE_CMD_REG_WR | QE_CMD_IMM_INQ,
....@@ -1293,8 +1278,6 @@
12931278 .send = fs_send,
12941279 .owner = THIS_MODULE,
12951280 /* ioctl: fs_ioctl, */
1296
- /* getsockopt: fs_getsockopt, */
1297
- /* setsockopt: fs_setsockopt, */
12981281 /* change_qos: fs_change_qos, */
12991282
13001283 /* For now implement these internally here... */
....@@ -1414,7 +1397,7 @@
14141397
14151398 func_enter ();
14161399
1417
- fs_dprintk (FS_DEBUG_INIT, "Inititing queue at %x: %d entries:\n",
1400
+ fs_dprintk (FS_DEBUG_INIT, "Initializing queue at %x: %d entries:\n",
14181401 queue, nentries);
14191402
14201403 p = aligned_kmalloc (sz, GFP_KERNEL, 0x10);
....@@ -1447,7 +1430,7 @@
14471430 {
14481431 func_enter ();
14491432
1450
- fs_dprintk (FS_DEBUG_INIT, "Inititing free pool at %x:\n", queue);
1433
+ fs_dprintk (FS_DEBUG_INIT, "Initializing free pool at %x:\n", queue);
14511434
14521435 write_fs (dev, FP_CNF(queue), (bufsize * RBFP_RBS) | RBFP_RBSVAL | RBFP_CME);
14531436 write_fs (dev, FP_SA(queue), 0);
....@@ -1650,7 +1633,7 @@
16501633 }
16511634
16521635 if (status & ISR_TBRQ_W) {
1653
- fs_dprintk (FS_DEBUG_IRQ, "Data tramsitted!\n");
1636
+ fs_dprintk (FS_DEBUG_IRQ, "Data transmitted!\n");
16541637 process_txdone_queue (dev, &dev->tx_relq);
16551638 }
16561639
....@@ -1692,6 +1675,8 @@
16921675 dev->hw_base = pci_resource_start(pci_dev, 0);
16931676
16941677 dev->base = ioremap(dev->hw_base, 0x1000);
1678
+ if (!dev->base)
1679
+ return 1;
16951680
16961681 reset_chip (dev);
16971682