diff options
| author | John Garry <john.g.garry@oracle.com> | 2026-06-04 14:58:40 +0000 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-06-08 14:29:19 -0700 |
| commit | 92f58587a04c94985fd4a9e3575720b054c432bf (patch) | |
| tree | f6c779795621274da668f3cd93d925c37ddc39fb /include/linux/debugobjects.h | |
| parent | 6fe0687245e8406bf26143bd45eb16441bbe5280 (diff) | |
nvme: quieten sparse warning in valid LBA size check
Currently building with C=1 generates the following warning:
CC drivers/nvme/host/core.o
CHECK drivers/nvme/host/core.c
drivers/nvme/host/core.c:2426:13: warning: unsigned value that used to be signed checked against zero?
drivers/nvme/host/core.c:2426:13: signed value source
This issue was introduced when using check_shl_overflow() to check for
invalid LBA size. Sparse is having trouble dealing with __bitwise __le64
conversion when passing to check_shl_overflow().
Resolve the issue by moving the check_shl_overflow() call to a separate
function, where types are not converted.
The id->lbaf[lbaf].ds < SECTOR_SHIFT check is dropped as
check_shl_overflow() is able to detect negative shifts.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
