android_kernel_sony_sdm845/drivers/memstick/core
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arnd Bergmann 5460176e6f memstick: avoid out-of-range warning
[ Upstream commit 4853396f03c3019eccf5cd113e464231e9ddf0b3 ]

clang-14 complains about a sanity check that always passes when the
page size is 64KB or larger:

drivers/memstick/core/ms_block.c:1739:21: error: result of comparison of constant 65536 with expression of type 'unsigned short' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        if (msb->page_size > PAGE_SIZE) {
            ~~~~~~~~~~~~~~ ^ ~~~~~~~~~

This is fine, it will still work on all architectures, so just shut
up that warning with a cast.

Fixes: 0ab30494bc ("memstick: add support for legacy memorysticks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210927094520.696665-1-arnd@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:48:34 +01:00
..
Kconfig
Makefile
memstick.c memstick: fix a double-free bug in memstick_check 2020-12-29 13:44:56 +01:00
ms_block.c memstick: avoid out-of-range warning 2021-11-26 11:48:34 +01:00
ms_block.h memstick: trivial fix of spelling mistake on management 2016-04-28 10:58:33 +02:00
mspro_block.c memstick: don't allow REQ_TYPE_BLOCK_PC requests 2016-07-20 17:38:27 -06:00