ata: libata: Make ata_platform_remove_one return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 12 May 2023 20:46:46 +0000 (22:46 +0200)
committerDamien Le Moal <dlemoal@kernel.org>
Sun, 14 May 2023 21:49:39 +0000 (06:49 +0900)
The function returned zero unconditionally, so the function returning an
int is something between useless and irritating. With the goal to make
platform drivers' remove function return void, it's helpful to convert
the function accordingly. This converts several drivers to the new
.remove_new callback that was introduced to smoothen the platform driver
conversion.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
21 files changed:
drivers/ata/ahci_brcm.c
drivers/ata/ahci_ceva.c
drivers/ata/ahci_da850.c
drivers/ata/ahci_dm816.c
drivers/ata/ahci_dwc.c
drivers/ata/ahci_imx.c
drivers/ata/ahci_mtk.c
drivers/ata/ahci_mvebu.c
drivers/ata/ahci_platform.c
drivers/ata/ahci_qoriq.c
drivers/ata/ahci_seattle.c
drivers/ata/ahci_st.c
drivers/ata/ahci_sunxi.c
drivers/ata/ahci_tegra.c
drivers/ata/ahci_xgene.c
drivers/ata/libata-core.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/pata_of_platform.c
drivers/ata/pata_platform.c
drivers/ata/sata_highbank.c
include/linux/libata.h

index 4e3dc2b6d67f8199aa1ce1c0cb712e7ba396dfd4..70c3a33eee6f24058694851e4f83b80d3a68dcdd 100644 (file)
@@ -544,7 +544,7 @@ out_reset:
        return ret;
 }
 
-static int brcm_ahci_remove(struct platform_device *pdev)
+static void brcm_ahci_remove(struct platform_device *pdev)
 {
        struct ata_host *host = dev_get_drvdata(&pdev->dev);
        struct ahci_host_priv *hpriv = host->private_data;
@@ -552,7 +552,7 @@ static int brcm_ahci_remove(struct platform_device *pdev)
 
        brcm_sata_phys_disable(priv);
 
-       return ata_platform_remove_one(pdev);
+       ata_platform_remove_one(pdev);
 }
 
 static void brcm_ahci_shutdown(struct platform_device *pdev)
@@ -573,7 +573,7 @@ static SIMPLE_DEV_PM_OPS(ahci_brcm_pm_ops, brcm_ahci_suspend, brcm_ahci_resume);
 
 static struct platform_driver brcm_ahci_driver = {
        .probe = brcm_ahci_probe,
-       .remove = brcm_ahci_remove,
+       .remove_new = brcm_ahci_remove,
        .shutdown = brcm_ahci_shutdown,
        .driver = {
                .name = DRV_NAME,
index bc027468decb9a3950fc16b00be1863c5c94cc51..c2b6be083af434d2ea2a539bae101b9b7259f9cf 100644 (file)
@@ -369,7 +369,7 @@ MODULE_DEVICE_TABLE(of, ceva_ahci_of_match);
 
 static struct platform_driver ceva_ahci_driver = {
        .probe = ceva_ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = ceva_ahci_of_match,
index ca0924dc5bd26ba424b26bd040bf83720c96b56f..55a6627d5450e7b6625cfa29e50138489b2c6f05 100644 (file)
@@ -238,7 +238,7 @@ MODULE_DEVICE_TABLE(of, ahci_da850_of_match);
 
 static struct platform_driver ahci_da850_driver = {
        .probe = ahci_da850_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = ahci_da850_of_match,
index b08547b877a1f77ba220e925de321ed034147d7b..4cb70064fb9944e06ca108208d597cc27a6a7e4d 100644 (file)
@@ -182,7 +182,7 @@ MODULE_DEVICE_TABLE(of, ahci_dm816_of_match);
 
 static struct platform_driver ahci_dm816_driver = {
        .probe = ahci_dm816_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = AHCI_DM816_DRV_NAME,
                .of_match_table = ahci_dm816_of_match,
index 4bfbb09cdc029410aea49337cb5e72ad0792cfac..9604a2f6ed489e4ad5d9bde8ede8032446daf262 100644 (file)
@@ -478,7 +478,7 @@ MODULE_DEVICE_TABLE(of, ahci_dwc_of_match);
 
 static struct platform_driver ahci_dwc_driver = {
        .probe = ahci_dwc_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .shutdown = ahci_platform_shutdown,
        .driver = {
                .name = DRV_NAME,
index 3a8c248e7c0e88113f52044ae7889b895a8241d0..9fa005965f3b2fc7994025c3cb6f82692675c058 100644 (file)
@@ -1223,7 +1223,7 @@ static SIMPLE_DEV_PM_OPS(ahci_imx_pm_ops, imx_ahci_suspend, imx_ahci_resume);
 
 static struct platform_driver imx_ahci_driver = {
        .probe = imx_ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = imx_ahci_of_match,
index 0bf83a297091297f2dfb87bf2c97a400395679c1..5083fb6c49277324a7e38fd44f158067c64747df 100644 (file)
@@ -173,7 +173,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
 
 static struct platform_driver mtk_ahci_driver = {
        .probe = mtk_ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = ahci_of_match,
index 596cf017f42791d38dd440d3860abf1ac47db389..76450151858236df0b3c3465e28d2109ec6691fb 100644 (file)
@@ -245,7 +245,7 @@ MODULE_DEVICE_TABLE(of, ahci_mvebu_of_match);
 
 static struct platform_driver ahci_mvebu_driver = {
        .probe = ahci_mvebu_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .suspend = ahci_mvebu_suspend,
        .resume = ahci_mvebu_resume,
        .driver = {
index 299ee686ac49a616d029f33503cc6840e00887bf..ab30c7138d73b3bc505552f06a1ae85ffe14e142 100644 (file)
@@ -96,7 +96,7 @@ MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
 
 static struct platform_driver ahci_driver = {
        .probe = ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .shutdown = ahci_platform_shutdown,
        .driver = {
                .name = DRV_NAME,
index 0ba764d283c86a5fff3766b7262aad7ebdf4e3c4..3d01b118c9a1a2f8f1770525b8560f007deefc20 100644 (file)
@@ -359,7 +359,7 @@ static SIMPLE_DEV_PM_OPS(ahci_qoriq_pm_ops, ahci_platform_suspend,
 
 static struct platform_driver ahci_qoriq_driver = {
        .probe = ahci_qoriq_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = ahci_qoriq_of_match,
index 9eda7bbd215138e0ef00efa5f9415da237191dc8..2c32d58c6ae7543bafb327c99254ceb461b61004 100644 (file)
@@ -187,7 +187,7 @@ MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
 
 static struct platform_driver ahci_seattle_driver = {
        .probe = ahci_seattle_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .acpi_match_table = ahci_acpi_match,
index f2c1edb3698615e1f4ec2b92cc86c4e5eb6c5743..d4a626f87963ba123a4f07a366c28681db4714fa 100644 (file)
@@ -239,7 +239,7 @@ static struct platform_driver st_ahci_driver = {
                .of_match_table = st_ahci_match,
        },
        .probe = st_ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
 };
 module_platform_driver(st_ahci_driver);
 
index 076c12b4ba08bd9a15bfc9c6b443dd09bfc48177..04531fa95e404c41ac5313f77231d603b01e7b50 100644 (file)
@@ -292,7 +292,7 @@ MODULE_DEVICE_TABLE(of, ahci_sunxi_of_match);
 
 static struct platform_driver ahci_sunxi_driver = {
        .probe = ahci_sunxi_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = ahci_sunxi_of_match,
index 8e5e2b359f2d2049dbd8e34ec5170c15b8cf12a5..21c20793e517780ec69c1e65d6df06a9b7315fd0 100644 (file)
@@ -609,7 +609,7 @@ deinit_controller:
 
 static struct platform_driver tegra_ahci_driver = {
        .probe = tegra_ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = tegra_ahci_of_match,
index 83f5ff54ef5b9c1537fff064a2f9f50468204d54..eb773f2e28fcbbc6eeccbc9b0eff6197e2ef6a87 100644 (file)
@@ -868,7 +868,7 @@ disable_resources:
 
 static struct platform_driver xgene_ahci_driver = {
        .probe = xgene_ahci_probe,
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
        .driver = {
                .name = DRV_NAME,
                .of_match_table = xgene_ahci_of_match,
index 8bf612bdd61a5a1d8d04d70fd8579249ede7c728..e9fc69fbe06bc58bae54b65e0dea95f6ac115a87 100644 (file)
@@ -6141,13 +6141,11 @@ EXPORT_SYMBOL_GPL(ata_pci_device_resume);
  *     LOCKING:
  *     Inherited from platform layer (may sleep).
  */
-int ata_platform_remove_one(struct platform_device *pdev)
+void ata_platform_remove_one(struct platform_device *pdev)
 {
        struct ata_host *host = platform_get_drvdata(pdev);
 
        ata_host_detach(host);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(ata_platform_remove_one);
 
index 99a2ce7234953f5b6139b3e18779a38d9f1c1035..b1daa4d3fcd97818bb6b26180008d515cef9ea00 100644 (file)
@@ -303,7 +303,7 @@ static struct platform_driver ixp4xx_pata_platform_driver = {
                .of_match_table = ixp4xx_pata_of_match,
        },
        .probe          = ixp4xx_pata_probe,
-       .remove         = ata_platform_remove_one,
+       .remove_new     = ata_platform_remove_one,
 };
 
 module_platform_driver(ixp4xx_pata_platform_driver);
index 178b28eff170a97f3c1190f432b8e54a465ecafb..4956f0f5b93fad69b500b4da91d5d0be78a33366 100644 (file)
@@ -89,7 +89,7 @@ static struct platform_driver pata_of_platform_driver = {
                .of_match_table = pata_of_platform_match,
        },
        .probe          = pata_of_platform_probe,
-       .remove         = ata_platform_remove_one,
+       .remove_new     = ata_platform_remove_one,
 };
 
 module_platform_driver(pata_of_platform_driver);
index 87479bc893b252622d5f5b4a0761a09a3adb6d93..232c3dad7ee88acbfaa8a0ef4afb8ef399c85e8c 100644 (file)
@@ -223,7 +223,7 @@ static int pata_platform_probe(struct platform_device *pdev)
 
 static struct platform_driver pata_platform_driver = {
        .probe          = pata_platform_probe,
-       .remove         = ata_platform_remove_one,
+       .remove_new     = ata_platform_remove_one,
        .driver = {
                .name           = DRV_NAME,
        },
index 8237ece4a46fee455ce4e42e988e7768952155f3..d6b324d03e5974b7fde0bdaf9b027df3083d5868 100644 (file)
@@ -614,7 +614,7 @@ static SIMPLE_DEV_PM_OPS(ahci_highbank_pm_ops,
                  ahci_highbank_suspend, ahci_highbank_resume);
 
 static struct platform_driver ahci_highbank_driver = {
-       .remove = ata_platform_remove_one,
+       .remove_new = ata_platform_remove_one,
         .driver = {
                 .name = "highbank-ahci",
                 .of_match_table = ahci_of_match,
index 311cd93377c75e20a80a3dbe48f60d3453b940a3..01f9fbb69f8960b72900d1a7fd1a88763f9c49e4 100644 (file)
@@ -1276,7 +1276,7 @@ extern int ata_pci_device_resume(struct pci_dev *pdev);
 
 struct platform_device;
 
-extern int ata_platform_remove_one(struct platform_device *pdev);
+extern void ata_platform_remove_one(struct platform_device *pdev);
 
 /*
  * ACPI - drivers/ata/libata-acpi.c