From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "rdunlap@infradead.org" <rdunlap@infradead.org>,
"sbauer@plzdonthack.me" <sbauer@plzdonthack.me>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"Rajashekar, Revanth" <revanth.rajashekar@intel.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 2/2] block: sed-opal: fix sparse warning: convert __be64 data
Date: Thu, 3 Oct 2019 17:06:06 +0000 [thread overview]
Message-ID: <d091d361b0233da07f45488aae87857cb9388529.camel@intel.com> (raw)
In-Reply-To: <20191003154053.GA2450@hacktheplanet>
On Thu, 2019-10-03 at 11:40 -0400, Scott Bauer wrote:
> On Wed, Oct 02, 2019 at 07:23:15PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <rdunlap@infradead.org>
> >
> > sparse warns about incorrect type when using __be64 data.
> > It is not being converted to CPU-endian but it should be.
> >
> > Fixes these sparse warnings:
> >
> > ../block/sed-opal.c:375:20: warning: incorrect type in assignment (different base types)
> > ../block/sed-opal.c:375:20: expected unsigned long long [usertype] align
> > ../block/sed-opal.c:375:20: got restricted __be64 const [usertype] alignment_granularity
> > ../block/sed-opal.c:376:25: warning: incorrect type in assignment (different base types)
> > ../block/sed-opal.c:376:25: expected unsigned long long [usertype] lowest_lba
> > ../block/sed-opal.c:376:25: got restricted __be64 const [usertype] lowest_aligned_lba
> >
> > Fixes: 455a7b238cd6 ("block: Add Sed-opal library")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Scott Bauer <scott.bauer@intel.com>
> > Cc: Rafael Antognolli <rafael.antognolli@intel.com>
> > Cc: Jens Axboe <axboe@kernel.dk>
> > Cc: linux-block@vger.kernel.org
>
> + Jon and Revanth,
>
>
> These look fine. They're currently unused, but may be useful in the future for sysfs or what ever else we add in.
I imagine modern devices with logical/physical indirection would
probably report gran=1 and lowest=0 regardless.
Either way,
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
prev parent reply other threads:[~2019-10-03 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 2:23 Randy Dunlap
2019-10-03 15:40 ` Scott Bauer
2019-10-03 17:06 ` Derrick, Jonathan [this message]
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=d091d361b0233da07f45488aae87857cb9388529.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=revanth.rajashekar@intel.com \
--cc=sbauer@plzdonthack.me \
/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
all inboxes | Powered by JetHome®