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

i3c: Make i3c_master_unregister() return void

The function returned zero unconditionally. Switch the return type to void
and simplify the callers accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230318233311.265186-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Uwe Kleine-König and committed by
Alexandre Belloni
0f74f8b6 1dae3f1d

+8 -19
+1 -5
drivers/i3c/master.c
··· 2695 2695 * @master: master used to send frames on the bus 2696 2696 * 2697 2697 * Basically undo everything done in i3c_master_register(). 2698 - * 2699 - * Return: 0 in case of success, a negative error code otherwise. 2700 2698 */ 2701 - int i3c_master_unregister(struct i3c_master_controller *master) 2699 + void i3c_master_unregister(struct i3c_master_controller *master) 2702 2700 { 2703 2701 i3c_master_i2c_adapter_cleanup(master); 2704 2702 i3c_master_unregister_i3c_devs(master); 2705 2703 i3c_master_bus_cleanup(master); 2706 2704 device_unregister(&master->dev); 2707 - 2708 - return 0; 2709 2705 } 2710 2706 EXPORT_SYMBOL_GPL(i3c_master_unregister); 2711 2707
+1 -4
drivers/i3c/master/dw-i3c-master.c
··· 1185 1185 static int dw_i3c_remove(struct platform_device *pdev) 1186 1186 { 1187 1187 struct dw_i3c_master *master = platform_get_drvdata(pdev); 1188 - int ret; 1189 1188 1190 - ret = i3c_master_unregister(&master->base); 1191 - if (ret) 1192 - return ret; 1189 + i3c_master_unregister(&master->base); 1193 1190 1194 1191 reset_control_assert(master->core_rst); 1195 1192
+1 -4
drivers/i3c/master/i3c-master-cdns.c
··· 1665 1665 static int cdns_i3c_master_remove(struct platform_device *pdev) 1666 1666 { 1667 1667 struct cdns_i3c_master *master = platform_get_drvdata(pdev); 1668 - int ret; 1669 1668 1670 - ret = i3c_master_unregister(&master->base); 1671 - if (ret) 1672 - return ret; 1669 + i3c_master_unregister(&master->base); 1673 1670 1674 1671 clk_disable_unprepare(master->sysclk); 1675 1672 clk_disable_unprepare(master->pclk);
+3 -1
drivers/i3c/master/mipi-i3c-hci/core.c
··· 769 769 { 770 770 struct i3c_hci *hci = platform_get_drvdata(pdev); 771 771 772 - return i3c_master_unregister(&hci->master); 772 + i3c_master_unregister(&hci->master); 773 + 774 + return 0; 773 775 } 774 776 775 777 static const __maybe_unused struct of_device_id i3c_hci_of_match[] = {
+1 -4
drivers/i3c/master/svc-i3c-master.c
··· 1572 1572 static int svc_i3c_master_remove(struct platform_device *pdev) 1573 1573 { 1574 1574 struct svc_i3c_master *master = platform_get_drvdata(pdev); 1575 - int ret; 1576 1575 1577 - ret = i3c_master_unregister(&master->base); 1578 - if (ret) 1579 - return ret; 1576 + i3c_master_unregister(&master->base); 1580 1577 1581 1578 pm_runtime_dont_use_autosuspend(&pdev->dev); 1582 1579 pm_runtime_disable(&pdev->dev);
+1 -1
include/linux/i3c/master.h
··· 542 542 struct device *parent, 543 543 const struct i3c_master_controller_ops *ops, 544 544 bool secondary); 545 - int i3c_master_unregister(struct i3c_master_controller *master); 545 + void i3c_master_unregister(struct i3c_master_controller *master); 546 546 547 547 /** 548 548 * i3c_dev_get_master_data() - get master private data attached to an I3C