From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, john.garry@huawei.com,
stable@vger.kernel.org
Subject: Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile
Date: Wed, 05 Dec 2018 09:04:33 -0500 [thread overview]
Message-ID: <yq1d0qgqdce.fsf@oracle.com> (raw)
In-Reply-To: <2abe64a3-d54b-4cbb-bc56-1796e62fd0f9@acm.org> (Bart Van Assche's message of "Tue, 4 Dec 2018 20:24:32 -0800")
Hi Bart,
> Since the return value of this function is 'u32', can the ' &
> 0xffffffff' be left out?
Absolutely, and I almost zapped it. However, I decided to leave it to
emphasize the point that the reference tag is truncated to a 32-bit
value. To me, this is more obvious than having to backtrack and spot the
u32 in the function definition. I generally appreciate some sort of
commentary around a return statement if the value deviates from the
ordinary.
The parentheses around the shift value irk me but had to leave those in
place to silence gcc.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2018-12-05 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <yq1ftvcsoes.fsf@oracle.com>
2018-12-05 2:31 ` [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile Martin K. Petersen
2018-12-05 4:24 ` Bart Van Assche
2018-12-05 14:04 ` Martin K. Petersen [this message]
2018-12-05 15:00 ` Bart Van Assche
2018-12-06 4:17 ` Martin K. Petersen
2018-12-06 12:04 ` John Garry
2018-12-06 12:16 ` chenxiang (M)
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=yq1d0qgqdce.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=bvanassche@acm.org \
--cc=john.garry@huawei.com \
--cc=linux-scsi@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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).