diff mbox series

[4/7] Introduce scsi_out_cmd()

Message ID 20190122185724.71598-5-bvanassche@acm.org (mailing list archive)
State Superseded
Headers show
Series Fix handling of bidi commands | expand

Commit Message

Bart Van Assche Jan. 22, 2019, 6:57 p.m. UTC
This patch does not change any functionality.

Cc: Douglas Gilbert <dgilbert@interlog.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 include/scsi/scsi_cmnd.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 78183e851a0d..213404163993 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -230,9 +230,14 @@  static inline struct scsi_data_buffer *scsi_in(struct scsi_cmnd *cmd)
 	return &scsi_in_cmd(cmd)->sdb;
 }
 
+static inline struct scsi_cmnd *scsi_out_cmd(struct scsi_cmnd *cmd)
+{
+	return cmd;
+}
+
 static inline struct scsi_data_buffer *scsi_out(struct scsi_cmnd *cmd)
 {
-	return &cmd->sdb;
+	return &scsi_out_cmd(cmd)->sdb;
 }
 
 static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd,