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: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 9:55 DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT chenxiang (M)
2018-11-27 13:08 ` Ming Lei
2018-11-28 3:37 ` chenxiang (M)
2018-11-29 18:17 ` Ming Lei
[not found] ` <6c573f36-60d8-0631-e9ac-dacd72f6c8ad@hisilicon.com>
2018-11-29 0:54 ` Ming Lei
2018-11-30 1:19 ` Ming Lei
2018-11-30 11:26 ` John Garry
2018-12-04 3:55 ` Martin K. Petersen
[not found] ` <45193ec6-6398-3953-4833-88ca2057971a@huawei.com>
2018-12-05 2:22 ` Martin K. Petersen
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:04 ` John Garry
2018-12-06 12:16 ` chenxiang (M)
2018-12-06 12:16 ` chenxiang (M)
2018-12-05 15:27 ` DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT John Garry
2018-12-06 4:22 ` Martin K. Petersen
2018-12-06 17:33 ` John Garry
2018-12-07 3:20 ` Martin K. Petersen
2018-12-05 2:56 ` Martin K. Petersen
2018-11-27 20:22 ` Ewan D. Milne
2018-11-28 3:11 ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.