Skip to content

Commit c7b0065

Browse files
committed
Merge tag 'ata-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull ata fixes from Damien Le Moal: "Several minor fixes: - Fix the module alias for the ahci_imx driver to get autoloading to work (Alexander) - Fix a potential array-index-out-of-bounds problem with the enclosure managment support in the ahci driver (Kai-Heng) - Several patches to fix compilation warnings thrown by clang in the ahci_st, sata_rcar, ahci_brcm, ahci_xgene, ahci_imx and ahci_qoriq drivers (me)" * tag 'ata-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: ahci_qoriq: Fix compilation warning ata: ahci_imx: Fix compilation warning ata: ahci_xgene: Fix compilation warning ata: ahci_brcm: Fix compilation warning ata: sata_rcar: Fix compilation warning ata: ahci_st: Fix compilation warning ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS ata: ahci-imx: Fix MODULE_ALIAS
2 parents a3ccea6 + 2ce3a0b commit c7b0065

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

drivers/ata/ahci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ enum {
257257
PCS_7 = 0x94, /* 7+ port PCS (Denverton) */
258258

259259
/* em constants */
260-
EM_MAX_SLOTS = 8,
260+
EM_MAX_SLOTS = SATA_PMP_MAX_PORTS,
261261
EM_MAX_RETRY = 5,
262262

263263
/* em_ctl bits */

drivers/ata/ahci_brcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
448448
if (!of_id)
449449
return -ENODEV;
450450

451-
priv->version = (enum brcm_ahci_version)of_id->data;
451+
priv->version = (unsigned long)of_id->data;
452452
priv->dev = dev;
453453

454454
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");

drivers/ata/ahci_imx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
10671067
imxpriv->ahci_pdev = pdev;
10681068
imxpriv->no_device = false;
10691069
imxpriv->first_time = true;
1070-
imxpriv->type = (enum ahci_imx_type)of_id->data;
1070+
imxpriv->type = (unsigned long)of_id->data;
10711071

10721072
imxpriv->sata_clk = devm_clk_get(dev, "sata");
10731073
if (IS_ERR(imxpriv->sata_clk)) {
@@ -1235,4 +1235,4 @@ module_platform_driver(imx_ahci_driver);
12351235
MODULE_DESCRIPTION("Freescale i.MX AHCI SATA platform driver");
12361236
MODULE_AUTHOR("Richard Zhu <[email protected]>");
12371237
MODULE_LICENSE("GPL");
1238-
MODULE_ALIAS("ahci:imx");
1238+
MODULE_ALIAS("platform:" DRV_NAME);

drivers/ata/ahci_qoriq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
280280
return -ENOMEM;
281281

282282
if (of_id)
283-
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
283+
qoriq_priv->type = (unsigned long)of_id->data;
284284
else
285285
qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;
286286

drivers/ata/ahci_st.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
236236
.driver = {
237237
.name = DRV_NAME,
238238
.pm = &st_ahci_pm_ops,
239-
.of_match_table = of_match_ptr(st_ahci_match),
239+
.of_match_table = st_ahci_match,
240240
},
241241
.probe = st_ahci_probe,
242242
.remove = ata_platform_remove_one,

drivers/ata/ahci_xgene.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
785785
of_devid = of_match_device(xgene_ahci_of_match, dev);
786786
if (of_devid) {
787787
if (of_devid->data)
788-
version = (enum xgene_ahci_version) of_devid->data;
788+
version = (unsigned long) of_devid->data;
789789
}
790790
#ifdef CONFIG_ACPI
791791
else {

drivers/ata/sata_rcar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
875875
if (!priv)
876876
return -ENOMEM;
877877

878-
priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
878+
priv->type = (unsigned long)of_device_get_match_data(dev);
879879

880880
pm_runtime_enable(dev);
881881
ret = pm_runtime_get_sync(dev);

0 commit comments

Comments
 (0)