Skip to content

Commit 1309d4e

Browse files
author
Linus Torvalds
committed
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: ata: fix sparse warning in pata_acpi.c ata: fix sparse warning in pata_marvell.c ata: fix sparse warning in pata_jmicron.c ata: fix sparse warning in pata_cs5536.c ata: sparse fixes for pata_amd.c pata_scc.c: add thaw ops pata_cs5536.c bugfix pata_legacy: don't call ata_host_detach() after initialization failure ata: fix sparse warnings in sata_mv.c ata: fix sparse warning in sata_via.c ata: fix sparse warning in sata_promise.c ata: fix sparse warning in ata_piix.c ata: fix sparse warning in libata-core.c ata: make ata_scsiop_inq_89 static in libata-scsi.c
2 parents 101142c + 5410f72 commit 1309d4e

13 files changed

Lines changed: 22 additions & 25 deletions

‎drivers/ata/ata_piix.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
16521652
u8 tmp;
16531653
pci_read_config_byte(pdev, PIIX_SCC, &tmp);
16541654
if (tmp == PIIX_AHCI_DEVICE) {
1655-
int rc = piix_disable_ahci(pdev);
1655+
rc = piix_disable_ahci(pdev);
16561656
if (rc)
16571657
return rc;
16581658
}

‎drivers/ata/libata-core.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7086,7 +7086,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
70867086
DPRINTK("probe begin\n");
70877087
for (i = 0; i < host->n_ports; i++) {
70887088
struct ata_port *ap = host->ports[i];
7089-
int rc;
70907089

70917090
/* probe */
70927091
if (ap->ops->error_handler) {

‎drivers/ata/libata-scsi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf,
18621862
* spin_lock_irqsave(host lock)
18631863
*/
18641864

1865-
unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf,
1865+
static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf,
18661866
unsigned int buflen)
18671867
{
18681868
u8 pbuf[60];

‎drivers/ata/pata_acpi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ static int pacpi_cable_detect(struct ata_port *ap)
7777

7878
static void pacpi_error_handler(struct ata_port *ap)
7979
{
80-
return ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset,
81-
NULL, ata_std_postreset);
80+
ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, NULL,
81+
ata_std_postreset);
8282
}
8383

8484
/**

‎drivers/ata/pata_amd.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ static int amd_pre_reset(struct ata_link *link, unsigned long deadline)
146146

147147
static void amd_error_handler(struct ata_port *ap)
148148
{
149-
return ata_bmdma_drive_eh(ap, amd_pre_reset,
150-
ata_std_softreset, NULL,
151-
ata_std_postreset);
149+
ata_bmdma_drive_eh(ap, amd_pre_reset, ata_std_softreset, NULL,
150+
ata_std_postreset);
152151
}
153152

154153
static int amd_cable_detect(struct ata_port *ap)
@@ -506,7 +505,6 @@ static struct ata_port_operations amd133_port_ops = {
506505
static struct ata_port_operations nv100_port_ops = {
507506
.set_piomode = nv100_set_piomode,
508507
.set_dmamode = nv100_set_dmamode,
509-
.mode_filter = ata_pci_default_filter,
510508
.tf_load = ata_tf_load,
511509
.tf_read = ata_tf_read,
512510
.check_status = ata_check_status,
@@ -541,7 +539,6 @@ static struct ata_port_operations nv100_port_ops = {
541539
static struct ata_port_operations nv133_port_ops = {
542540
.set_piomode = nv133_set_piomode,
543541
.set_dmamode = nv133_set_dmamode,
544-
.mode_filter = ata_pci_default_filter,
545542
.tf_load = ata_tf_load,
546543
.tf_read = ata_tf_read,
547544
.check_status = ata_check_status,

‎drivers/ata/pata_cs5536.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <asm/msr.h>
4141

4242
#define DRV_NAME "pata_cs5536"
43-
#define DRV_VERSION "0.0.6"
43+
#define DRV_VERSION "0.0.7"
4444

4545
enum {
4646
CFG = 0,
@@ -85,7 +85,7 @@ static const u8 pci_reg[4] = {
8585
PCI_IDE_CFG, PCI_IDE_DTC, PCI_IDE_CAST, PCI_IDE_ETC,
8686
};
8787

88-
static inline int cs5536_read(struct pci_dev *pdev, int reg, int *val)
88+
static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val)
8989
{
9090
if (unlikely(use_msr)) {
9191
u32 dummy;
@@ -153,8 +153,8 @@ static void cs5536_set_piomode(struct ata_port *ap, struct ata_device *adev)
153153
struct ata_device *pair = ata_dev_pair(adev);
154154
int mode = adev->pio_mode - XFER_PIO_0;
155155
int cmdmode = mode;
156-
int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT;
157-
int cshift = ap->port_no ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT;
156+
int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT;
157+
int cshift = adev->devno ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT;
158158
u32 dtc, cast, etc;
159159

160160
if (pair)
@@ -201,7 +201,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
201201
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
202202
u32 dtc, etc;
203203
int mode = adev->dma_mode;
204-
int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT;
204+
int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT;
205205

206206
if (mode >= XFER_UDMA_0) {
207207
cs5536_read(pdev, ETC, &etc);

‎drivers/ata/pata_jmicron.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)
115115

116116
static void jmicron_error_handler(struct ata_port *ap)
117117
{
118-
return ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
118+
ata_bmdma_drive_eh(ap, jmicron_pre_reset, ata_std_softreset, NULL,
119+
ata_std_postreset);
119120
}
120121

121122
/* No PIO or DMA methods needed for this device */

‎drivers/ata/pata_legacy.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,6 @@ static __init int legacy_init_one(struct legacy_probe *probe)
12781278
}
12791279
}
12801280
fail:
1281-
if (host)
1282-
ata_host_detach(host);
12831281
platform_device_unregister(pdev);
12841282
return ret;
12851283
}

‎drivers/ata/pata_marvell.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static int marvell_cable_detect(struct ata_port *ap)
8585

8686
static void marvell_error_handler(struct ata_port *ap)
8787
{
88-
return ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset,
89-
NULL, ata_std_postreset);
88+
ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset, NULL,
89+
ata_std_postreset);
9090
}
9191

9292
/* No PIO or DMA methods needed for this device */

‎drivers/ata/pata_scc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,8 @@ static const struct ata_port_operations scc_pata_ops = {
10071007
.qc_issue = ata_qc_issue_prot,
10081008

10091009
.freeze = scc_bmdma_freeze,
1010+
.thaw = ata_bmdma_thaw,
1011+
10101012
.error_handler = scc_error_handler,
10111013
.post_internal_cmd = scc_bmdma_stop,
10121014

0 commit comments

Comments
 (0)