]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-core: make implicit seed truncation explicit
authorBart Van Assche <bvanassche@acm.org>
Wed, 10 Oct 2018 15:08:19 +0000 (08:08 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Oct 2018 06:58:30 +0000 (08:58 +0200)
commit69b61ea6c3f92ffc8db531f3ca99b6f8af04f03f
tree65dbfcc35ad0ed809118f34f5af7a916893e5ed5
parentf2cfbc01872242a5c89de9bffae257ea2f97fafc
nvme-core: make implicit seed truncation explicit

The nvme_user_io.slba field is 64 bits wide. That value is copied into the
32-bit bio_integrity_payload.bip_iter.bi_sector field. Make that truncation
explicit to avoid that Coverity complains about implicit truncation. See
also Coverity ID 1056486 on http://scan.coverity.com/projects/linux.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c