Re: [PATCH 2/2] block: sed-opal: fix sparse warning: convert __be64 data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> > 
> > 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@xxxxxxxxxxxxx>
> > Cc: Scott Bauer <scott.bauer@xxxxxxxxx>
> > Cc: Rafael Antognolli <rafael.antognolli@xxxxxxxxx>
> > Cc: Jens Axboe <axboe@xxxxxxxxx>
> > Cc: linux-block@xxxxxxxxxxxxxxx
> 
> + 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@xxxxxxxxx>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux