Uwe Kleine-König
0842b7617e
scsi: ufs: Convert all platform drivers to return void
...
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().
All platform drivers below drivers/ufs/ unconditionally return zero in
their remove callback and so can be converted trivially to the variant
returning void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20230917145722.1131557-1-u.kleine-koenig@pengutronix.de
Reviewed-by: Bean Huo <beanhuo@micron.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-09-21 21:48:05 -04:00
Bart Van Assche
8d8af294ce
scsi: ufs: Fix kernel-doc headers
...
Fix the remaining kernel-doc warnings that are reported when building with
W=2.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230727194457.3152309-4-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-07-31 15:17:50 -04:00
Bart Van Assche
fd4bffb54d
scsi: ufs: Document all return values
...
This patch fixes multiple W=2 kernel-doc warnings.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230727194457.3152309-3-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-07-31 15:17:50 -04:00
Bart Van Assche
3a17fefe0f
scsi: ufs: Follow the kernel-doc syntax for documenting return values
...
Use 'Return:' to document the return value instead of 'Returns' as required
by the kernel-doc documentation.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230727194457.3152309-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-07-31 15:17:50 -04:00
Bart Van Assche
0818a6903c
scsi: ufs: core: Simplify driver shutdown
...
All UFS host drivers call ufshcd_shutdown(). Hence, instead of calling
ufshcd_shutdown() from the host driver .shutdown() callback, inline that
function into ufshcd_wl_shutdown().
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230524203659.1394307-5-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-31 20:35:01 -04:00
Bart Van Assche
dd11376b9f
scsi: ufs: Split the drivers/scsi/ufs directory
...
Split the drivers/scsi/ufs directory into 'core' and 'host' directories
under the drivers/ufs/ directory. Move shared header files into the
include/ufs/ directory. This separation makes it clear which header files
UFS drivers are allowed to include (include/ufs/*.h) and which header files
UFS drivers are not allowed to include (drivers/ufs/core/*.h).
Update the MAINTAINERS file. Add myself as a UFS reviewer.
Link: https://lore.kernel.org/r/20220511212552.655341-1-bvanassche@acm.org
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Avri Altman <avri.altman@wdc.com >
Cc: Bean Huo <beanhuo@micron.com >
Cc: Bjorn Andersson <bjorn.andersson@linaro.org >
Cc: Keoseong Park <keosung.park@samsung.com >
Tested-by: Bean Huo <beanhuo@micron.com >
Tested-by: Adrian Hunter <adrian.hunter@intel.com >
Reviewed-by: Bean Huo <beanhuo@micron.com >
Acked-by: Avri Altman <avri.altman@wdc.com >
Acked-by: Adrian Hunter <adrian.hunter@intel.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-05-19 20:27:37 -04:00