With clang-4.0 and later we see:
warning: logical not is only applied to the left hand side of this bitwise
operator [-Wlogical-not-parentheses]
        if ((!gd->flags & GD_FLG_RELOC))
             ^          ~

And while the compiler suggests adding parenthesis around gd->flags, a
reading of the code says that we want to know when GD_FLG_RELOC is not
set and then return.

Cc: Simon Glass <s...@chromium.org>
Cc: Anatolij Gustschin <ag...@denx.de>
Signed-off-by: Tom Rini <tr...@konsulko.com>
---
 drivers/video/video-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index b5bb8e0efde5..93fdc6828b1e 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -272,7 +272,7 @@ static int video_post_bind(struct udevice *dev)
        ulong size;
 
        /* Before relocation there is nothing to do here */
-       if ((!gd->flags & GD_FLG_RELOC))
+       if (!(gd->flags & GD_FLG_RELOC))
                return 0;
        size = alloc_fb(dev, &addr);
        if (addr < gd->video_bottom) {
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to