- Aug 02, 2023
-
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Uwe Kleine-König authored
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Niklas Cassel authored
Now that all libata drivers have migrated to use the error_handler callback, remove the deprecated phy_reset and eng_timeout callbacks. Also remove references to non-existent functions sata_phy_reset and ata_qc_timeout from Documentation/driver-api/libata.rst. Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Niklas Cassel authored
Remove ata_bus_probe() as it is unused. Also, remove references to ata_bus_probe and port_disable in Documentation/driver-api/libata.rst, as neither exist anymore. Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Niklas Cassel authored
The TODO claims that the pdc_20621_ops should set the .inherits function pointer to &ata_base_port_ops after it has been converted to use the new EH. However, the driver was converted to use the new EH a long time ago, in commit 67651ee5 ("[libata] sata_sx4: convert to new exception handling methods"), which also did set .inherits function pointer to &ata_sff_port_ops (and ata_sff_port_ops itself has .inherits set to &ata_base_port_ops). Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Niklas Cassel authored
ata_sas_port_init() now only contains a single initialization. Move this single initialization to ata_sas_port_alloc(), since: 1) ata_sas_port_alloc() already initializes some of the struct members. 2) ata_sas_port_alloc() is only used by libsas. Suggested-by:
John Garry <john.g.garry@oracle.com> Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Hannes Reinecke authored
Rename __ata_port_probe() to ata_port_probe() and drop the wrapper ata_sas_async_probe(). Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Hannes Reinecke authored
Just used in one place. Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Hannes Reinecke authored
Unused. Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Hannes Reinecke authored
Is now a wrapper around kfree(), so call it directly. Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Hannes Reinecke authored
Callbacks are empty now, so remove them. Also, remove the call to ap->ops->port_start() in ata_sas_port_init(), as this would otherwise cause a NULL pointer dereference, now when the callback is gone. Signed-off-by:
Hannes Reinecke <hare@suse.de> [niklas: remove the call to ap->ops->port_start() in ata_sas_port_init()] Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Hannes Reinecke authored
With commit 65a15d65 ("scsi: ipr: Remove SATA support") all libata drivers now have the error_handler() callback provided, so we can stop checking for non-existing error_handler callback. Signed-off-by:
Hannes Reinecke <hare@suse.de> [niklas: fixed review comments, rebased, solved conflicts during rebase, fixed bug that unconditionally dumped all QCs, removed the now unused function ata_dump_status(), removed the now unreachable failure paths in atapi_qc_complete(), removed the non-EH function to request ATAPI sense] Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
John Garry <john.g.garry@oracle.com> Reviewed-by:
Jason Yan <yanaijie@huawei.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
sil24_exec_polled_cmd() passes its 'unsigned long timeout_msec' parameter to ata_wait_register() that now takes 'unsigned int' -- eliminate unneeded implicit casts, not forgetting about sil24_do_softreset()... Signed-off-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
xgene_ahci_poll_reg_val() passes its 'unsigned long {interval|timeout}' params verbatim to ata_{msleep|deadline}() that just take 'unsigned int' param for the time intervals in ms -- eliminate unneeded implicit cast... Signed-off-by:Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
ahci_exec_polled_cmd() passes its 'unsigned long timeout_msec' parameter to ata_wait_register() that now takes 'unsigned int' -- eliminate unneeded implicit casts, not forgetting about ahci_do_softreset()... Signed-off-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
ata_scsi_park_store() passes its 'long input' variable (if it's >= 0) to ata_deadline() that now takes 'unsigned int' -- eliminate unneeded implicit cast... Signed-off-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
sata_deb_timing_{hotplug|long|normal}[] store 'unsigned long' debounce timeouts in ms, while sata_link_debounce() eventually uses those timeouts by calling ata_{deadline|msleep}( which take just 'unsigned int'. Change the debounce timeout table element's type to 'unsigned int' -- all these timeouts happily fit into 'unsigned int'... Signed-off-by:Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
ata_eh_reset_timeouts[] stores 'unsigned long' timeouts in ms, while ata_eh_reset() passes these values to ata_deadline() that takes just 'unsigned int timeout_msecs' parameter. Change the reset timeout table element's type to 'unsigned int' -- all timeouts fit into 'unsigned int' but we have to change ULONG_MAX to UINT_MAX... Signed-off-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
ata_wait_register() passes its 'unsigned long {interval|timeout}' params verbatim to ata_{msleep|deadline}() that just take 'unsigned int' param for the time intervals in ms -- eliminate unneeded implicit casts... Signed-off-by:Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Sergey Shtylyov authored
ata_deadline() passes its 'unsigned long timeout_msecs' parameter verbatim to msecs_to_jiffies() which takes just 'unsigned int' -- eliminate unneeded implicit cast... Signed-off-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
As commit ce753ad1 ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") says, there is no need to check if the platform_get_irq return value is 0. Let's remove it. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
As commit ce753ad1 ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") says, there is no need to check if the platform_get_irq return value is 0. Let's remove it. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
There is no need to initialize the variable ret. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Reviewed-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Yangtao Li authored
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by:
Yangtao Li <frank.li@vivo.com> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-
Rob Herring authored
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Damien Le Moal <dlemoal@kernel.org>
-