summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2023-10-02 19:53:13 +0200
committerAlex Williamson <alex.williamson@redhat.com>2023-10-03 19:40:49 +0200
commitf9af5ad0f5b599fadf6fc7c9c2153d7919c7691e (patch)
treed7b513d07828292fe3c10b70d574590e7c24d592 /samples
parentvfio/mlx5: Activate the chunk mode functionality (diff)
downloadlinux-f9af5ad0f5b599fadf6fc7c9c2153d7919c7691e.tar.xz
linux-f9af5ad0f5b599fadf6fc7c9c2153d7919c7691e.zip
vfio/cdx: Add parentheses between bitwise AND expression and logical NOT
When building with clang, there is a warning (or error with CONFIG_WERROR=y) due to a bitwise AND and logical NOT in vfio_cdx_bm_ctrl(): drivers/vfio/cdx/main.c:77:6: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] 77 | if (!vdev->flags & BME_SUPPORT) | ^ ~ drivers/vfio/cdx/main.c:77:6: note: add parentheses after the '!' to evaluate the bitwise operator first 77 | if (!vdev->flags & BME_SUPPORT) | ^ | ( ) drivers/vfio/cdx/main.c:77:6: note: add parentheses around left hand side expression to silence this warning 77 | if (!vdev->flags & BME_SUPPORT) | ^ | ( ) 1 error generated. Add the parentheses as suggested in the first note, which is clearly what was intended here. Closes: https://github.com/ClangBuiltLinux/linux/issues/1939 Fixes: 8a97ab9b8b31 ("vfio-cdx: add bus mastering device feature support") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Nikhil Agarwal <nikhil.agarwal@amd.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20231002-vfio-cdx-logical-not-parentheses-v1-1-a8846c7adfb6@kernel.org Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions