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.