| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * pata_atp867x.c - ARTOP 867X 64bit 4-channel UDMA133 ATA controller driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Per Atp867 data sheet rev 1.2, Acard. |
|---|
| 7 | 8 | * Based in part on early ide code from |
|---|
| 8 | 9 | * 2003-2004 by Eric Uhrhane, Google, Inc. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 12 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 13 | | - * (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | | - * GNU General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * You should have received a copy of the GNU General Public License |
|---|
| 21 | | - * along with this program; if not, write to the Free Software |
|---|
| 22 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 23 | | - * |
|---|
| 24 | 10 | * |
|---|
| 25 | 11 | * TODO: |
|---|
| 26 | 12 | * 1. RAID features [comparison, XOR, striping, mirroring, etc.] |
|---|
| .. | .. |
|---|
| 171 | 157 | default: |
|---|
| 172 | 158 | printk(KERN_WARNING "ATP867X: active %dclk is invalid. " |
|---|
| 173 | 159 | "Using 12clk.\n", clk); |
|---|
| 174 | | - /* fall through */ |
|---|
| 160 | + fallthrough; |
|---|
| 175 | 161 | case 9 ... 12: |
|---|
| 176 | 162 | clocks = 7; /* 12 clk */ |
|---|
| 177 | 163 | break; |
|---|
| .. | .. |
|---|
| 204 | 190 | default: |
|---|
| 205 | 191 | printk(KERN_WARNING "ATP867X: recover %dclk is invalid. " |
|---|
| 206 | 192 | "Using default 12clk.\n", clk); |
|---|
| 207 | | - /* fall through */ |
|---|
| 193 | + fallthrough; |
|---|
| 208 | 194 | case 12: /* default 12 clk */ |
|---|
| 209 | 195 | clocks = 0; |
|---|
| 210 | 196 | break; |
|---|
| .. | .. |
|---|
| 436 | 422 | #ifdef ATP867X_DEBUG |
|---|
| 437 | 423 | atp867x_check_res(pdev); |
|---|
| 438 | 424 | |
|---|
| 439 | | - for (i = 0; i < PCI_ROM_RESOURCE; i++) |
|---|
| 425 | + for (i = 0; i < PCI_STD_NUM_BARS; i++) |
|---|
| 440 | 426 | printk(KERN_DEBUG "ATP867X: iomap[%d]=0x%llx\n", i, |
|---|
| 441 | 427 | (unsigned long long)(host->iomap[i])); |
|---|
| 442 | 428 | #endif |
|---|
| .. | .. |
|---|
| 477 | 463 | |
|---|
| 478 | 464 | atp867x_fixup(host); |
|---|
| 479 | 465 | |
|---|
| 480 | | - rc = dma_set_mask(&pdev->dev, ATA_DMA_MASK); |
|---|
| 481 | | - if (rc) |
|---|
| 482 | | - return rc; |
|---|
| 483 | | - |
|---|
| 484 | | - rc = dma_set_coherent_mask(&pdev->dev, ATA_DMA_MASK); |
|---|
| 485 | | - return rc; |
|---|
| 466 | + return dma_set_mask_and_coherent(&pdev->dev, ATA_DMA_MASK); |
|---|
| 486 | 467 | } |
|---|
| 487 | 468 | |
|---|
| 488 | 469 | static int atp867x_init_one(struct pci_dev *pdev, |
|---|