* [PATCH] Make the scsi_init_io() documentation more accurate
@ 2020-06-29 16:04 Bart Van Assche
2020-06-29 16:15 ` Johannes Thumshirn
0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2020-06-29 16:04 UTC (permalink / raw)
To: Martin K . Petersen, James E . J . Bottomley
Cc: linux-scsi, Bart Van Assche, Christoph Hellwig,
Johannes Thumshirn, Hannes Reinecke, Daniel Wagner
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 <hch@lst.de>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/scsi_lib.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 7c42c00afb0d..b2b9bbaad9fe 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Make the scsi_init_io() documentation more accurate
2020-06-29 16:04 [PATCH] Make the scsi_init_io() documentation more accurate Bart Van Assche
@ 2020-06-29 16:15 ` Johannes Thumshirn
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Thumshirn @ 2020-06-29 16:15 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen, James E . J . Bottomley
Cc: linux-scsi, Christoph Hellwig, Hannes Reinecke, Daniel Wagner
On 29/06/2020 18:04, Bart Van Assche wrote:
> + * for @cmd. Functions like scsi_sg_count(), scsi_sg_list() and scsi_bufflen()
scsi_sglist() ~^
and I don't think that sentence should be included at all as these values are
initialized in scsi_init_sgtable().
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-29 19:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 16:04 [PATCH] Make the scsi_init_io() documentation more accurate Bart Van Assche
2020-06-29 16:15 ` Johannes Thumshirn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.