hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/ata/sata_via.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * sata_via.c - VIA Serial ATA controllers
34 *
....@@ -8,29 +9,10 @@
89 * Copyright 2003-2004 Red Hat, Inc. All rights reserved.
910 * Copyright 2003-2004 Jeff Garzik
1011 *
11
- *
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, or (at your option)
15
- * 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; see the file COPYING. If not, write to
24
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
25
- *
26
- *
2712 * libata documentation is available via 'make {ps|pdf}docs',
2813 * as Documentation/driver-api/libata.rst
2914 *
3015 * Hardware documentation available under NDA.
31
- *
32
- *
33
- *
3416 */
3517
3618 #include <linux/kernel.h>
....@@ -523,14 +505,7 @@
523505 for (i = 0; i < host->n_ports; i++)
524506 vt6421_init_addrs(host->ports[i]);
525507
526
- rc = dma_set_mask(&pdev->dev, ATA_DMA_MASK);
527
- if (rc)
528
- return rc;
529
- rc = dma_set_coherent_mask(&pdev->dev, ATA_DMA_MASK);
530
- if (rc)
531
- return rc;
532
-
533
- return 0;
508
+ return dma_set_mask_and_coherent(&pdev->dev, ATA_DMA_MASK);
534509 }
535510
536511 static int vt8251_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)