From 7b824e75056a45d7c40eea9014edffa1b5289750 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 26 Mar 2026 17:59:25 -0500 Subject: scsi: document return values of public functions Add Return: documentation for some public functions in scsi.h that were missing it. Signed-off-by: David Lechner --- include/scsi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/scsi.h b/include/scsi.h index 8d6c5116419..c244120c283 100644 --- a/include/scsi.h +++ b/include/scsi.h @@ -340,6 +340,7 @@ int scsi_bus_reset(struct udevice *dev); * scsi_scan() - Scan all SCSI controllers for available devices * * @vebose: true to show information about each device found + * Return: 0 if OK, -ve on error */ int scsi_scan(bool verbose); @@ -348,6 +349,7 @@ int scsi_scan(bool verbose); * * @dev: SCSI bus * @verbose: true to show information about each device found + * Return: 0 if OK, -ve on error */ int scsi_scan_dev(struct udevice *dev, bool verbose); @@ -357,6 +359,7 @@ int scsi_scan_dev(struct udevice *dev, bool verbose); * @uuid: UUID of the partition for fetching its info * @blk_desc_ptr: Provides the blk descriptor * @part_info_ptr: Provides partition info + * Return: 0 if OK, -ve on error */ int scsi_get_blk_by_uuid(const char *uuid, struct blk_desc **blk_desc_ptr, struct disk_partition *part_info_ptr); -- cgit v1.2.3 From b382cd0973521a5197a097d4e190f47aadb79757 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 26 Mar 2026 17:59:26 -0500 Subject: scsi: move scsi_scan() call out of scsi_get_blk_by_uuid() Move scsi_scan() call out of scsi_get_blk_by_uuid(). The only caller, env_scsi_get_part(), should be managing this call since it may also want to use different ways to get the partition information in the future. Signed-off-by: David Lechner --- include/scsi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/scsi.h b/include/scsi.h index c244120c283..2520a8b8fe6 100644 --- a/include/scsi.h +++ b/include/scsi.h @@ -356,6 +356,8 @@ int scsi_scan_dev(struct udevice *dev, bool verbose); /** * scsi_get_blk_by_uuid() - Provides SCSI partition information. * + * scsi_scan() must have been called before calling this function. + * * @uuid: UUID of the partition for fetching its info * @blk_desc_ptr: Provides the blk descriptor * @part_info_ptr: Provides partition info -- cgit v1.2.3