Files
linux/drivers/misc
Arnd Bergmann 5c7d5dda1e cb710: avoid NULL pointer subtraction
commit 42641042c1 upstream.

clang-14 complains about an unusual way of converting a pointer to
an integer:

drivers/misc/cb710/sgbuf2.c:50:15: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
        return ((ptr - NULL) & 3) != 0;

Replace this with a normal cast to uintptr_t.

Fixes: 5f5bac8272 ("mmc: Driver for CB710/720 memory card reader (MMC part)")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210927121408.939246-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-16 12:00:45 +09:00
..
2023-05-16 08:46:23 +09:00
2013-08-27 08:28:01 -07:00
2023-05-16 11:09:59 +09:00
2018-03-22 09:54:47 +01:00
2023-05-15 08:25:32 +09:00