linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>,
	<linuxarm@huawei.com>, <linux-kernel@vger.kernel.org>,
	<linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/4] scsi: Add scsi_prot_op_normal()
Date: Tue, 20 Nov 2018 16:36:14 +0000	[thread overview]
Message-ID: <4493598c-7c25-a1b1-dfbb-aaec0b967185@huawei.com> (raw)
In-Reply-To: <20181120161940.GA10454@infradead.org>

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,



  reply	other threads:[~2018-11-20 16:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 14:59 [PATCH 0/4] hisi_sas: DIF/DIX support John Garry
2018-11-20 14:59 ` [PATCH 1/4] scsi: Add scsi_prot_op_normal() John Garry
2018-11-20 16:19   ` Christoph Hellwig
2018-11-20 16:36     ` John Garry [this message]
2018-11-20 14:59 ` [PATCH 2/4] scsi: hisi_sas: Relocate some code to reduce complexity John Garry
2018-11-20 14:59 ` [PATCH 3/4] scsi: hisi_sas: Make sg_tablesize consistent value John Garry
2018-11-21 11:02   ` Steffen Maier
2018-11-21 11:08     ` Steffen Maier
2018-11-21 11:45       ` John Garry
2018-11-20 14:59 ` [PATCH 4/4] scsi: hisi_sas: Add support for DIF/DIX feature for v3 hw John Garry
2018-11-24 17:50   ` kbuild test robot
2018-11-26 15:42     ` John Garry
2018-12-05  0:50       ` [kbuild-all] " Li, Philip

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4493598c-7c25-a1b1-dfbb-aaec0b967185@huawei.com \
    --to=john.garry@huawei.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).