Skip to content

Commit 39d2112

Browse files
rddunlapmartinkpetersen
authored andcommitted
scsi: scsi_lib: Add kernel-doc for exported functions
Add kernel-doc for scsi_failures_reset_retries() and scsi_alloc_request() since these are exported. This allows them to be part of the SCSI driver-api docbook. Fix kernel-doc comments for scsi_vpd_tpg_id() [add kernel-doc for one parameter and fix a typo]. Signed-off-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] CC: James E.J. Bottomley <[email protected]> CC: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent f52a04f commit 39d2112

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ void scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
184184
__scsi_queue_insert(cmd, reason, true);
185185
}
186186

187+
/**
188+
* scsi_failures_reset_retries - reset all failures to zero
189+
* @failures: &struct scsi_failures with specific failure modes set
190+
*/
187191
void scsi_failures_reset_retries(struct scsi_failures *failures)
188192
{
189193
struct scsi_failure *failure;
@@ -1214,6 +1218,15 @@ static void scsi_initialize_rq(struct request *rq)
12141218
cmd->retries = 0;
12151219
}
12161220

1221+
/**
1222+
* scsi_alloc_request - allocate a block request and partially
1223+
* initialize its &scsi_cmnd
1224+
* @q: the device's request queue
1225+
* @opf: the request operation code
1226+
* @flags: block layer allocation flags
1227+
*
1228+
* Return: &struct request pointer on success or %NULL on failure
1229+
*/
12171230
struct request *scsi_alloc_request(struct request_queue *q, blk_opf_t opf,
12181231
blk_mq_req_flags_t flags)
12191232
{
@@ -3365,14 +3378,16 @@ int scsi_vpd_lun_id(struct scsi_device *sdev, char *id, size_t id_len)
33653378
}
33663379
EXPORT_SYMBOL(scsi_vpd_lun_id);
33673380

3368-
/*
3381+
/**
33693382
* scsi_vpd_tpg_id - return a target port group identifier
33703383
* @sdev: SCSI device
3384+
* @rel_id: pointer to return relative target port in if not %NULL
33713385
*
33723386
* Returns the Target Port Group identifier from the information
3373-
* froom VPD page 0x83 of the device.
3387+
* from VPD page 0x83 of the device.
3388+
* Optionally sets @rel_id to the relative target port on success.
33743389
*
3375-
* Returns the identifier or error on failure.
3390+
* Return: the identifier or error on failure.
33763391
*/
33773392
int scsi_vpd_tpg_id(struct scsi_device *sdev, int *rel_id)
33783393
{

0 commit comments

Comments
 (0)