diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-02-28 22:18:12 +0100 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-04-07 17:13:27 +0200 |
commit | dd073c03933603907ad45428c227754d694168cf (patch) | |
tree | e35cb39d229381cf2f8fee7db0d1e2de020c84cd /lib/linux_string.c | |
parent | 79da1a96c21819a8e0f6b82b62b66325d05dc7d4 (diff) |
mmc: tmio: Check 'addr' width before checking for 64bit limitation
The 64bit limitation check is compiled and optimized out on 32bit
platforms, but generates a type width warning:
drivers/mmc/tmio-common.c: In function ‘tmio_sd_addr_is_dmaable’:
drivers/mmc/tmio-common.c:376:26: warning: right shift count >= width of type [-Wshift-count-overflow]
376 | if (addr >> 32)
| ^~
Fix the warning by checking the addr type width to see whether the
shift even makes sense in the first place. The width check is also
optimized out at compile time.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'lib/linux_string.c')
0 files changed, 0 insertions, 0 deletions