Thread (55 messages) 55 messages, 4 authors, 2021-06-24

Re: [PATCH 03/18] scsi: add scsi_{get,put}_internal_cmd() helper

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-06-23 16:09:42

On 5/3/21 8:03 AM, Hannes Reinecke wrote:
+struct scsi_cmnd *scsi_get_internal_cmd(struct scsi_device *sdev,
+	unsigned int op, blk_mq_req_flags_t flags)
+{
+	struct request *rq;
+	struct scsi_cmnd *scmd;
+
+	WARN_ON_ONCE(((op & REQ_OP_MASK) != REQ_OP_SCSI_IN) &&
+		     ((op & REQ_OP_MASK) != REQ_OP_SCSI_OUT));
Consider using blk_op_is_scsi() instead of open-coding it.

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help