Re: [PATCH 1/4] scsi: Add scsi_prot_op_normal()

From: John Garry
Date: Tue Nov 20 2018 - 11:36:43 EST


On 20/11/2018 16:19, Christoph Hellwig wrote:
+static inline bool scsi_prot_op_normal(struct scsi_cmnd *scmd)
+{
+ return scmd->prot_op == SCSI_PROT_NORMAL;
+}

This "wrapper" just obsfucates the check being performed, please drop
it.

.


ok, if you think so.

I just thought that was better for a more concise check, rather than this common pattern:
if ((scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) ...

cheers,