From patchwork Sun Apr 22 13:47:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 902621 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40TWBY3Lthz9s0q for ; Sun, 22 Apr 2018 23:48:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 07C38C21DF3; Sun, 22 Apr 2018 13:47:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0426FC21C57; Sun, 22 Apr 2018 13:47:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7AE55C21C29; Sun, 22 Apr 2018 13:47:54 +0000 (UTC) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.161.194]) by lists.denx.de (Postfix) with ESMTPS id E241CC21C27 for ; Sun, 22 Apr 2018 13:47:53 +0000 (UTC) Received: by mail-yw0-f194.google.com with SMTP id u83-v6so4155666ywc.4 for ; Sun, 22 Apr 2018 06:47:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rBQ8Ck2T7Z41/Qnuqier9cIhYAnSL3gAq/lCzzrqi2w=; b=KcizjThxOIo83h1pJcWVtJvyrf+ECO7T/LaR2PCxMlTcxeGX7c168Y4+WR8zOWjY/H HckiIx5tpurdPsWP/tGGAG6taLzBQBH43VV2HqJhMYVl5mpW7Vt73/SVxPH1BZl1fF1t Y4gNnUmnIRwyG6F9rbu15k9Z7aI/xP4ylhDJmNqwY+CtEucnLE8Iv5c/ypyIR5blB9ux Pz85KzsuRAZ6ZfFZd9G74F/kdfO4NG9oUy9ErhI0+ZF2HELwcYz/hnX+5X2baxPt7qEP NyJZT/FwIqW4b4+HbqCxMjBdqZCqduegTJVbDc90v09S9l6e0Lb1GpeZ5eNq4Z6FcqlW vKiw== X-Gm-Message-State: ALQs6tAauWJOiuE//Fn8QzWPm6FGixicbtgC4t61tWTd50FDk70oYPQR 0flzNXyPSd62VKv64N0DEMiW X-Google-Smtp-Source: AIpwx49bRhwcWmU27oy7NoIeqcnUGf/8D0JxaxF+b9q6q576QnGNS7mY02rdnmFTl9NTKi5luSjX7w== X-Received: by 2002:a81:3612:: with SMTP id d18-v6mr9146023ywa.381.1524404872396; Sun, 22 Apr 2018 06:47:52 -0700 (PDT) Received: from bill-the-cat.ec.rr.com (cpe-65-184-142-68.ec.res.rr.com. [65.184.142.68]) by smtp.gmail.com with ESMTPSA id w1-v6sm4392195ywa.42.2018.04.22.06.47.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Apr 2018 06:47:51 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Sun, 22 Apr 2018 09:47:48 -0400 Message-Id: <1524404868-28053-1-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] video-uclass: Fix logical-not-parentheses warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Cc: Anatolij Gustschin Signed-off-by: Tom Rini --- 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) {