Make the scsi_init_io() documentation more accurate
PATCH 1/1 Make the scsi_init_io() documentation more accurate
The current scsi_init_io() documentation does not accurately explain what this function does. Make the scsi_init_io() documentation more accurate.
Cc Christoph Hellwig <[email protected]>
Cc Johannes Thumshirn <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Daniel Wagner <[email protected]>
Signed-off-by Bart Van Assche <[email protected]>
--- drivers/scsi/scsi_lib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/scsi/scsi_lib.c +6 -2
@@ -961,8 +961,12 @@ static inline bool scsi_cmd_needs_dma_drain(struct scsi_device *sdev, }/** -* scsi_init_io - SCSI I/O initialization function. -* @cmd: command descriptor we wish to initialize +* scsi_init_io - Allocate and initialize data and integrity scatterlists +* @cmd: SCSI command data structure to initialize. +* +* Initializes @cmd->sdb and also @cmd->prot_sdb if data integrity is enabled +* for @cmd. Functions like scsi_sg_count(), scsi_sg_list() and scsi_bufflen() +* return the values stored by this function in the @cmd data structure. * * Returns: * * BLK_STS_OK - on success
Quoted 1 line · Bart Van Assche
+ * for @cmd. Functions like
scsi_sg_count(),scsi_sg_list()andscsi_bufflen()
scsi_sglist() ~^
and I don't think that sentence should be included at all as these values are initialized in scsi_init_sgtable().