Commit 30c7fab
committed
dm integrity: fix out-of-range warning
JIRA: https://issues.redhat.com/browse/RHEL-34599
Upstream Status: kernel/git/torvalds/linux.git
commit bdd000c
Author: Arnd Bergmann <arnd@arndb.de>
Date: Thu Mar 28 15:30:39 2024 +0100
dm integrity: fix out-of-range warning
[ Upstream commit 8e91c23 ]
Depending on the value of CONFIG_HZ, clang complains about a pointless
comparison:
drivers/md/dm-integrity.c:4085:12: error: result of comparison of
constant 42949672950 with expression of type
'unsigned int' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
if (val >= (uint64_t)UINT_MAX * 1000 / HZ) {
As the check remains useful for other configurations, shut up the
warning by adding a second type cast to uint64_t.
Fixes: 468dfca ("dm integrity: add a bitmap mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>1 parent eb3d358 commit 30c7fab
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4221 | 4221 | | |
4222 | 4222 | | |
4223 | 4223 | | |
4224 | | - | |
| 4224 | + | |
4225 | 4225 | | |
4226 | 4226 | | |
4227 | 4227 | | |
| |||
0 commit comments