summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2025-10-15 11:43:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-22 10:58:32 +0200
commit93741bd104ce07a790519ecee3a331ee7cf61ae3 (patch)
tree234a7c6253f778291c1410d2d0f307e151169d34 /tools/lib/python/kdoc/git@git.tavy.me:linux.git
parent832c8d3fce77cf03cc225fc555c1bffa1c547ba1 (diff)
usb: uhci: Work around bogus clang shift overflow warning from DMA_BIT_MASK(64)
After commit 18a9ec886d32 ("usb: uhci: Add Aspeed AST2700 support"), clang incorrectly warns: In file included from drivers/usb/host/uhci-hcd.c:855: drivers/usb/host/uhci-platform.c:69:32: error: shift count >= width of type [-Werror,-Wshift-count-overflow] 69 | static const u64 dma_mask_64 = DMA_BIT_MASK(64); | ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:93:54: note: expanded from macro 'DMA_BIT_MASK' 93 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | ^ ~~~ clang has a long outstanding and complicated problem [1] with generating a proper control flow graph at global scope, resulting in it being unable to understand that this shift can never happen due to the 'n == 64' check. Restructure the code to only use DMA_BIT_MASK() within uhci_hcd_platform_probe() (i.e., function scope) to avoid this global scope issue, similar to the approach of commit 274f2232a94f ("usb: ehci: Add Aspeed AST2700 support"). Closes: https://github.com/ClangBuiltLinux/linux/issues/2136 Link: https://github.com/ClangBuiltLinux/linux/issues/92 [1] Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Ryan Chen <ryan_chen@aspeedtech.com> Link: https://patch.msgid.link/20251015-usb-uhci-avoid-bogus-clang-shift-warning-v2-1-68532d2f6114@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions