Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pci/controller/remove-void-callbacks'

- Convert platform_device .remove() callbacks to return void instead of a
mostly useless int (Uwe Kleine-König)

* pci/controller/remove-void-callbacks:
PCI: xgene-msi: Convert to platform remove callback returning void
PCI: tegra: Convert to platform remove callback returning void
PCI: rockchip-host: Convert to platform remove callback returning void
PCI: mvebu: Convert to platform remove callback returning void
PCI: mt7621: Convert to platform remove callback returning void
PCI: mediatek-gen3: Convert to platform remove callback returning void
PCI: mediatek: Convert to platform remove callback returning void
PCI: iproc: Convert to platform remove callback returning void
PCI: hisi-error: Convert to platform remove callback returning void
PCI: dwc: Convert to platform remove callback returning void
PCI: j721e: Convert to platform remove callback returning void
PCI: brcmstb: Convert to platform remove callback returning void
PCI: altera-msi: Convert to platform remove callback returning void
PCI: altera: Convert to platform remove callback returning void
PCI: aardvark: Convert to platform remove callback returning void

+43 -80
+2 -4
drivers/pci/controller/cadence/pci-j721e.c
··· 542 542 return ret; 543 543 } 544 544 545 - static int j721e_pcie_remove(struct platform_device *pdev) 545 + static void j721e_pcie_remove(struct platform_device *pdev) 546 546 { 547 547 struct j721e_pcie *pcie = platform_get_drvdata(pdev); 548 548 struct cdns_pcie *cdns_pcie = pcie->cdns_pcie; ··· 552 552 cdns_pcie_disable_phy(cdns_pcie); 553 553 pm_runtime_put(dev); 554 554 pm_runtime_disable(dev); 555 - 556 - return 0; 557 555 } 558 556 559 557 static struct platform_driver j721e_pcie_driver = { 560 558 .probe = j721e_pcie_probe, 561 - .remove = j721e_pcie_remove, 559 + .remove_new = j721e_pcie_remove, 562 560 .driver = { 563 561 .name = "j721e-pcie", 564 562 .of_match_table = of_j721e_pcie_match,
+2 -4
drivers/pci/controller/dwc/pcie-bt1.c
··· 617 617 return bt1_pcie_add_port(btpci); 618 618 } 619 619 620 - static int bt1_pcie_remove(struct platform_device *pdev) 620 + static void bt1_pcie_remove(struct platform_device *pdev) 621 621 { 622 622 struct bt1_pcie *btpci = platform_get_drvdata(pdev); 623 623 624 624 bt1_pcie_del_port(btpci); 625 - 626 - return 0; 627 625 } 628 626 629 627 static const struct of_device_id bt1_pcie_of_match[] = { ··· 632 634 633 635 static struct platform_driver bt1_pcie_driver = { 634 636 .probe = bt1_pcie_probe, 635 - .remove = bt1_pcie_remove, 637 + .remove_new = bt1_pcie_remove, 636 638 .driver = { 637 639 .name = "bt1-pcie", 638 640 .of_match_table = bt1_pcie_of_match,
+2 -4
drivers/pci/controller/dwc/pcie-histb.c
··· 421 421 return 0; 422 422 } 423 423 424 - static int histb_pcie_remove(struct platform_device *pdev) 424 + static void histb_pcie_remove(struct platform_device *pdev) 425 425 { 426 426 struct histb_pcie *hipcie = platform_get_drvdata(pdev); 427 427 ··· 429 429 430 430 if (hipcie->phy) 431 431 phy_exit(hipcie->phy); 432 - 433 - return 0; 434 432 } 435 433 436 434 static const struct of_device_id histb_pcie_of_match[] = { ··· 439 441 440 442 static struct platform_driver histb_pcie_platform_driver = { 441 443 .probe = histb_pcie_probe, 442 - .remove = histb_pcie_remove, 444 + .remove_new = histb_pcie_remove, 443 445 .driver = { 444 446 .name = "histb-pcie", 445 447 .of_match_table = histb_pcie_of_match,
+2 -4
drivers/pci/controller/dwc/pcie-intel-gw.c
··· 340 340 phy_exit(pcie->phy); 341 341 } 342 342 343 - static int intel_pcie_remove(struct platform_device *pdev) 343 + static void intel_pcie_remove(struct platform_device *pdev) 344 344 { 345 345 struct intel_pcie *pcie = platform_get_drvdata(pdev); 346 346 struct dw_pcie_rp *pp = &pcie->pci.pp; 347 347 348 348 dw_pcie_host_deinit(pp); 349 349 __intel_pcie_remove(pcie); 350 - 351 - return 0; 352 350 } 353 351 354 352 static int intel_pcie_suspend_noirq(struct device *dev) ··· 441 443 442 444 static struct platform_driver intel_pcie_driver = { 443 445 .probe = intel_pcie_probe, 444 - .remove = intel_pcie_remove, 446 + .remove_new = intel_pcie_remove, 445 447 .driver = { 446 448 .name = "intel-gw-pcie", 447 449 .of_match_table = of_intel_pcie_match,
+3 -5
drivers/pci/controller/dwc/pcie-qcom-ep.c
··· 786 786 return ret; 787 787 } 788 788 789 - static int qcom_pcie_ep_remove(struct platform_device *pdev) 789 + static void qcom_pcie_ep_remove(struct platform_device *pdev) 790 790 { 791 791 struct qcom_pcie_ep *pcie_ep = platform_get_drvdata(pdev); 792 792 ··· 796 796 debugfs_remove_recursive(pcie_ep->debugfs); 797 797 798 798 if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED) 799 - return 0; 799 + return; 800 800 801 801 qcom_pcie_disable_resources(pcie_ep); 802 - 803 - return 0; 804 802 } 805 803 806 804 static const struct of_device_id qcom_pcie_ep_match[] = { ··· 810 812 811 813 static struct platform_driver qcom_pcie_ep_driver = { 812 814 .probe = qcom_pcie_ep_probe, 813 - .remove = qcom_pcie_ep_remove, 815 + .remove_new = qcom_pcie_ep_remove, 814 816 .driver = { 815 817 .name = "qcom-pcie-ep", 816 818 .of_match_table = qcom_pcie_ep_match,
+3 -5
drivers/pci/controller/dwc/pcie-tegra194.c
··· 2268 2268 return ret; 2269 2269 } 2270 2270 2271 - static int tegra_pcie_dw_remove(struct platform_device *pdev) 2271 + static void tegra_pcie_dw_remove(struct platform_device *pdev) 2272 2272 { 2273 2273 struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev); 2274 2274 2275 2275 if (pcie->of_data->mode == DW_PCIE_RC_TYPE) { 2276 2276 if (!pcie->link_state) 2277 - return 0; 2277 + return; 2278 2278 2279 2279 debugfs_remove_recursive(pcie->debugfs); 2280 2280 tegra_pcie_deinit_controller(pcie); ··· 2288 2288 tegra_bpmp_put(pcie->bpmp); 2289 2289 if (pcie->pex_refclk_sel_gpiod) 2290 2290 gpiod_set_value(pcie->pex_refclk_sel_gpiod, 0); 2291 - 2292 - return 0; 2293 2291 } 2294 2292 2295 2293 static int tegra_pcie_dw_suspend_late(struct device *dev) ··· 2481 2483 2482 2484 static struct platform_driver tegra_pcie_dw_driver = { 2483 2485 .probe = tegra_pcie_dw_probe, 2484 - .remove = tegra_pcie_dw_remove, 2486 + .remove_new = tegra_pcie_dw_remove, 2485 2487 .shutdown = tegra_pcie_dw_shutdown, 2486 2488 .driver = { 2487 2489 .name = "tegra194-pcie",
+2 -4
drivers/pci/controller/pci-aardvark.c
··· 1927 1927 return 0; 1928 1928 } 1929 1929 1930 - static int advk_pcie_remove(struct platform_device *pdev) 1930 + static void advk_pcie_remove(struct platform_device *pdev) 1931 1931 { 1932 1932 struct advk_pcie *pcie = platform_get_drvdata(pdev); 1933 1933 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); ··· 1989 1989 1990 1990 /* Disable phy */ 1991 1991 advk_pcie_disable_phy(pcie); 1992 - 1993 - return 0; 1994 1992 } 1995 1993 1996 1994 static const struct of_device_id advk_pcie_of_match_table[] = { ··· 2003 2005 .of_match_table = advk_pcie_of_match_table, 2004 2006 }, 2005 2007 .probe = advk_pcie_probe, 2006 - .remove = advk_pcie_remove, 2008 + .remove_new = advk_pcie_remove, 2007 2009 }; 2008 2010 module_platform_driver(advk_pcie_driver); 2009 2011
+2 -4
drivers/pci/controller/pci-mvebu.c
··· 1649 1649 return pci_host_probe(bridge); 1650 1650 } 1651 1651 1652 - static int mvebu_pcie_remove(struct platform_device *pdev) 1652 + static void mvebu_pcie_remove(struct platform_device *pdev) 1653 1653 { 1654 1654 struct mvebu_pcie *pcie = platform_get_drvdata(pdev); 1655 1655 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); ··· 1707 1707 /* Power down card and disable clocks. Must be the last step. */ 1708 1708 mvebu_pcie_powerdown(port); 1709 1709 } 1710 - 1711 - return 0; 1712 1710 } 1713 1711 1714 1712 static const struct of_device_id mvebu_pcie_of_match_table[] = { ··· 1728 1730 .pm = &mvebu_pcie_pm_ops, 1729 1731 }, 1730 1732 .probe = mvebu_pcie_probe, 1731 - .remove = mvebu_pcie_remove, 1733 + .remove_new = mvebu_pcie_remove, 1732 1734 }; 1733 1735 module_platform_driver(mvebu_pcie_driver); 1734 1736
+2 -4
drivers/pci/controller/pci-tegra.c
··· 2680 2680 return err; 2681 2681 } 2682 2682 2683 - static int tegra_pcie_remove(struct platform_device *pdev) 2683 + static void tegra_pcie_remove(struct platform_device *pdev) 2684 2684 { 2685 2685 struct tegra_pcie *pcie = platform_get_drvdata(pdev); 2686 2686 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); ··· 2701 2701 2702 2702 list_for_each_entry_safe(port, tmp, &pcie->ports, list) 2703 2703 tegra_pcie_port_free(port); 2704 - 2705 - return 0; 2706 2704 } 2707 2705 2708 2706 static int tegra_pcie_pm_suspend(struct device *dev) ··· 2806 2808 .pm = &tegra_pcie_pm_ops, 2807 2809 }, 2808 2810 .probe = tegra_pcie_probe, 2809 - .remove = tegra_pcie_remove, 2811 + .remove_new = tegra_pcie_remove, 2810 2812 }; 2811 2813 module_platform_driver(tegra_pcie_driver);
+2 -4
drivers/pci/controller/pci-xgene-msi.c
··· 348 348 349 349 static enum cpuhp_state pci_xgene_online; 350 350 351 - static int xgene_msi_remove(struct platform_device *pdev) 351 + static void xgene_msi_remove(struct platform_device *pdev) 352 352 { 353 353 struct xgene_msi *msi = platform_get_drvdata(pdev); 354 354 ··· 362 362 msi->bitmap = NULL; 363 363 364 364 xgene_free_domains(msi); 365 - 366 - return 0; 367 365 } 368 366 369 367 static int xgene_msi_hwirq_alloc(unsigned int cpu) ··· 519 521 .of_match_table = xgene_msi_match_table, 520 522 }, 521 523 .probe = xgene_msi_probe, 522 - .remove = xgene_msi_remove, 524 + .remove_new = xgene_msi_remove, 523 525 }; 524 526 525 527 static int __init xgene_pcie_msi_init(void)
+2 -3
drivers/pci/controller/pcie-altera-msi.c
··· 197 197 irq_domain_remove(msi->inner_domain); 198 198 } 199 199 200 - static int altera_msi_remove(struct platform_device *pdev) 200 + static void altera_msi_remove(struct platform_device *pdev) 201 201 { 202 202 struct altera_msi *msi = platform_get_drvdata(pdev); 203 203 ··· 207 207 altera_free_domains(msi); 208 208 209 209 platform_set_drvdata(pdev, NULL); 210 - return 0; 211 210 } 212 211 213 212 static int altera_msi_probe(struct platform_device *pdev) ··· 274 275 .of_match_table = altera_msi_of_match, 275 276 }, 276 277 .probe = altera_msi_probe, 277 - .remove = altera_msi_remove, 278 + .remove_new = altera_msi_remove, 278 279 }; 279 280 280 281 static int __init altera_msi_init(void)
+2 -4
drivers/pci/controller/pcie-altera.c
··· 806 806 return pci_host_probe(bridge); 807 807 } 808 808 809 - static int altera_pcie_remove(struct platform_device *pdev) 809 + static void altera_pcie_remove(struct platform_device *pdev) 810 810 { 811 811 struct altera_pcie *pcie = platform_get_drvdata(pdev); 812 812 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); ··· 814 814 pci_stop_root_bus(bridge->bus); 815 815 pci_remove_root_bus(bridge->bus); 816 816 altera_pcie_irq_teardown(pcie); 817 - 818 - return 0; 819 817 } 820 818 821 819 static struct platform_driver altera_pcie_driver = { 822 820 .probe = altera_pcie_probe, 823 - .remove = altera_pcie_remove, 821 + .remove_new = altera_pcie_remove, 824 822 .driver = { 825 823 .name = "altera-pcie", 826 824 .of_match_table = altera_pcie_of_match,
+2 -4
drivers/pci/controller/pcie-brcmstb.c
··· 1396 1396 clk_disable_unprepare(pcie->clk); 1397 1397 } 1398 1398 1399 - static int brcm_pcie_remove(struct platform_device *pdev) 1399 + static void brcm_pcie_remove(struct platform_device *pdev) 1400 1400 { 1401 1401 struct brcm_pcie *pcie = platform_get_drvdata(pdev); 1402 1402 struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); ··· 1404 1404 pci_stop_root_bus(bridge->bus); 1405 1405 pci_remove_root_bus(bridge->bus); 1406 1406 __brcm_pcie_remove(pcie); 1407 - 1408 - return 0; 1409 1407 } 1410 1408 1411 1409 static const int pcie_offsets[] = { ··· 1610 1612 1611 1613 static struct platform_driver brcm_pcie_driver = { 1612 1614 .probe = brcm_pcie_probe, 1613 - .remove = brcm_pcie_remove, 1615 + .remove_new = brcm_pcie_remove, 1614 1616 .driver = { 1615 1617 .name = "brcm-pcie", 1616 1618 .of_match_table = brcm_pcie_match,
+2 -4
drivers/pci/controller/pcie-hisi-error.c
··· 299 299 return 0; 300 300 } 301 301 302 - static int hisi_pcie_error_handler_remove(struct platform_device *pdev) 302 + static void hisi_pcie_error_handler_remove(struct platform_device *pdev) 303 303 { 304 304 struct hisi_pcie_error_private *priv = platform_get_drvdata(pdev); 305 305 306 306 ghes_unregister_vendor_record_notifier(&priv->nb); 307 - 308 - return 0; 309 307 } 310 308 311 309 static const struct acpi_device_id hisi_pcie_acpi_match[] = { ··· 317 319 .acpi_match_table = hisi_pcie_acpi_match, 318 320 }, 319 321 .probe = hisi_pcie_error_handler_probe, 320 - .remove = hisi_pcie_error_handler_remove, 322 + .remove_new = hisi_pcie_error_handler_remove, 321 323 }; 322 324 module_platform_driver(hisi_pcie_error_handler_driver); 323 325
+3 -3
drivers/pci/controller/pcie-iproc-platform.c
··· 114 114 return 0; 115 115 } 116 116 117 - static int iproc_pltfm_pcie_remove(struct platform_device *pdev) 117 + static void iproc_pltfm_pcie_remove(struct platform_device *pdev) 118 118 { 119 119 struct iproc_pcie *pcie = platform_get_drvdata(pdev); 120 120 121 - return iproc_pcie_remove(pcie); 121 + iproc_pcie_remove(pcie); 122 122 } 123 123 124 124 static void iproc_pltfm_pcie_shutdown(struct platform_device *pdev) ··· 134 134 .of_match_table = of_match_ptr(iproc_pcie_of_match_table), 135 135 }, 136 136 .probe = iproc_pltfm_pcie_probe, 137 - .remove = iproc_pltfm_pcie_remove, 137 + .remove_new = iproc_pltfm_pcie_remove, 138 138 .shutdown = iproc_pltfm_pcie_shutdown, 139 139 }; 140 140 module_platform_driver(iproc_pltfm_pcie_driver);
+1 -3
drivers/pci/controller/pcie-iproc.c
··· 1537 1537 } 1538 1538 EXPORT_SYMBOL(iproc_pcie_setup); 1539 1539 1540 - int iproc_pcie_remove(struct iproc_pcie *pcie) 1540 + void iproc_pcie_remove(struct iproc_pcie *pcie) 1541 1541 { 1542 1542 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); 1543 1543 ··· 1548 1548 1549 1549 phy_power_off(pcie->phy); 1550 1550 phy_exit(pcie->phy); 1551 - 1552 - return 0; 1553 1551 } 1554 1552 EXPORT_SYMBOL(iproc_pcie_remove); 1555 1553
+1 -1
drivers/pci/controller/pcie-iproc.h
··· 111 111 }; 112 112 113 113 int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res); 114 - int iproc_pcie_remove(struct iproc_pcie *pcie); 114 + void iproc_pcie_remove(struct iproc_pcie *pcie); 115 115 int iproc_pcie_shutdown(struct iproc_pcie *pcie); 116 116 117 117 #ifdef CONFIG_PCIE_IPROC_MSI
+2 -4
drivers/pci/controller/pcie-mediatek-gen3.c
··· 943 943 return 0; 944 944 } 945 945 946 - static int mtk_pcie_remove(struct platform_device *pdev) 946 + static void mtk_pcie_remove(struct platform_device *pdev) 947 947 { 948 948 struct mtk_gen3_pcie *pcie = platform_get_drvdata(pdev); 949 949 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); ··· 955 955 956 956 mtk_pcie_irq_teardown(pcie); 957 957 mtk_pcie_power_down(pcie); 958 - 959 - return 0; 960 958 } 961 959 962 960 static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie) ··· 1067 1069 1068 1070 static struct platform_driver mtk_pcie_driver = { 1069 1071 .probe = mtk_pcie_probe, 1070 - .remove = mtk_pcie_remove, 1072 + .remove_new = mtk_pcie_remove, 1071 1073 .driver = { 1072 1074 .name = "mtk-pcie-gen3", 1073 1075 .of_match_table = mtk_pcie_of_match,
+2 -4
drivers/pci/controller/pcie-mediatek.c
··· 1134 1134 pci_free_resource_list(windows); 1135 1135 } 1136 1136 1137 - static int mtk_pcie_remove(struct platform_device *pdev) 1137 + static void mtk_pcie_remove(struct platform_device *pdev) 1138 1138 { 1139 1139 struct mtk_pcie *pcie = platform_get_drvdata(pdev); 1140 1140 struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); ··· 1146 1146 mtk_pcie_irq_teardown(pcie); 1147 1147 1148 1148 mtk_pcie_put_resources(pcie); 1149 - 1150 - return 0; 1151 1149 } 1152 1150 1153 1151 static int mtk_pcie_suspend_noirq(struct device *dev) ··· 1237 1239 1238 1240 static struct platform_driver mtk_pcie_driver = { 1239 1241 .probe = mtk_pcie_probe, 1240 - .remove = mtk_pcie_remove, 1242 + .remove_new = mtk_pcie_remove, 1241 1243 .driver = { 1242 1244 .name = "mtk-pcie", 1243 1245 .of_match_table = mtk_pcie_ids,
+2 -4
drivers/pci/controller/pcie-mt7621.c
··· 524 524 return err; 525 525 } 526 526 527 - static int mt7621_pcie_remove(struct platform_device *pdev) 527 + static void mt7621_pcie_remove(struct platform_device *pdev) 528 528 { 529 529 struct mt7621_pcie *pcie = platform_get_drvdata(pdev); 530 530 struct mt7621_pcie_port *port; 531 531 532 532 list_for_each_entry(port, &pcie->ports, list) 533 533 reset_control_put(port->pcie_rst); 534 - 535 - return 0; 536 534 } 537 535 538 536 static const struct of_device_id mt7621_pcie_ids[] = { ··· 541 543 542 544 static struct platform_driver mt7621_pcie_driver = { 543 545 .probe = mt7621_pcie_probe, 544 - .remove = mt7621_pcie_remove, 546 + .remove_new = mt7621_pcie_remove, 545 547 .driver = { 546 548 .name = "mt7621-pci", 547 549 .of_match_table = mt7621_pcie_ids,
+2 -4
drivers/pci/controller/pcie-rockchip-host.c
··· 1009 1009 return err; 1010 1010 } 1011 1011 1012 - static int rockchip_pcie_remove(struct platform_device *pdev) 1012 + static void rockchip_pcie_remove(struct platform_device *pdev) 1013 1013 { 1014 1014 struct device *dev = &pdev->dev; 1015 1015 struct rockchip_pcie *rockchip = dev_get_drvdata(dev); ··· 1029 1029 regulator_disable(rockchip->vpcie3v3); 1030 1030 regulator_disable(rockchip->vpcie1v8); 1031 1031 regulator_disable(rockchip->vpcie0v9); 1032 - 1033 - return 0; 1034 1032 } 1035 1033 1036 1034 static const struct dev_pm_ops rockchip_pcie_pm_ops = { ··· 1049 1051 .pm = &rockchip_pcie_pm_ops, 1050 1052 }, 1051 1053 .probe = rockchip_pcie_probe, 1052 - .remove = rockchip_pcie_remove, 1054 + .remove_new = rockchip_pcie_remove, 1053 1055 }; 1054 1056 module_platform_driver(rockchip_pcie_driver); 1055 1057