Skip to content
Snippets Groups Projects
Commit 1bfecd9d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Frieder Schrempf
Browse files

nilfs2: fix out-of-range warning


[ Upstream commit c473bcdd ]

clang-14 points out that v_size is always smaller than a 64KB
page size if that is configured by the CPU architecture:

fs/nilfs2/ioctl.c:63:19: error: result of comparison of constant 65536 with expression of type '__u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        if (argv->v_size > PAGE_SIZE)
            ~~~~~~~~~~~~ ^ ~~~~~~~~~

This is ok, so just shut up that warning with a cast.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240328143051.1069575-7-arnd@kernel.org


Fixes: 3358b4aa ("nilfs2: fix problems of memory allocation in ioctl")
Acked-by: default avatarRyusuke Konishi <konishi.ryusuke@gmail.com>
Reviewed-by: default avatarJustin Stitt <justinstitt@google.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e7b1a2ad
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment