From patchwork Tue Jun 18 02:03:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11000805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9A5C924 for ; Tue, 18 Jun 2019 02:03:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8A87289A1 for ; Tue, 18 Jun 2019 02:03:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC5D8289B5; Tue, 18 Jun 2019 02:03:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40706289A1 for ; Tue, 18 Jun 2019 02:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kmt/iuFIxxCOz21g8Lm7pruFO82qK52DuDSAePOxdhU=; b=i0kipoLrKKDzRr JdJP2j4zk043TX4Z5I3YlPGqdCvrQlQTzB2RkYN3fZbSheq6SommwcA95A5pfrbmI9bczLuF174vT aveBgttqxHIoOQojxyln79eT/Knjb6BdL6hbxOzTZ95u//2aye5Lf0RFQGvZJY0jR9W3IuQcuugd8 RzAr0sQJLh8zFeiwgy09+AKDqdIMoe2a2Oa2eNyHz2eu90g3lrYcKT343ZKB5cHN+2SfXqscOu8mA DyXZNkIsk6rZ3EbiXVLs0VHMvMvrLs0HAlMJaSVP7ugiJHA3ltdj/eatFwE7MyDxYTBxOX6sFignS J/TOl8yNB3v+dg33lHcw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hd3T9-0005RS-80; Tue, 18 Jun 2019 02:03:31 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hd3T5-0005Qb-DW for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 02:03:29 +0000 Received: by mail-ed1-x541.google.com with SMTP id p15so19073794eds.8 for ; Mon, 17 Jun 2019 19:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9rGyx5MyzqUL3hNOygIg5vXHZRw+5lYUo6VLZDjttNw=; b=FuXeWKdL8BGiWJGtyC1PFvRLq9ViMtGSDNMZ/pJDkbqRcio+YVUMdElG6Di7415wdI qfxUDnvTcOB6yhMLtyTaser6XGh1uusGV61345rBFjLQ0KP+UxI/IDjZhffIDwigL2VK krtnJwix6O7swFlFuLZ9mRI4+x9V0p39n9DPsp3m6kCuNtmufnm+TQnpYJm1YFIJrlwS wDuUPeyHGNFoBu5f5zUOODtc1W0httU5ogD0rYvWMSRIKmC5oHgPbkWabGogSgAZYqmg yG8JriQByBXHNBj/jg6nC+hV7bEMmt5qqvXWnrjiFgT4ogF4ukZmrE8Iucvh/ROy+n4M W10w== 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:mime-version :content-transfer-encoding; bh=9rGyx5MyzqUL3hNOygIg5vXHZRw+5lYUo6VLZDjttNw=; b=C4J8/1Wktl/BwKpyAVi4opQFFDtGlT5BMwPi+Zk4VInDu1hCLjg6loO+uW7GFLJ2es fzfX1ieTVykajS0z5Mh3pC1DRdkTc97SKw/TnmQ9MQmyltLDUOjqt1heADLuJ54v9KGt f4lfDglhUKLKkgAQfLWT9Y0eaRU5qX835Jh+El0fVA2GM/KWZaRBnzrxd7MXdSlLz4ac enbNO4ZmWxh97n8Hunw04wuq2EqnO6lpN7e5ubviHJghy3yEIUZ0awf2zRmOFHJU2Id8 1e7wZlOICwHOQz4y9LJnH5DZQbtou3IC1nytOESmVolp15eKO6fJ7GE7T+6V0EtcZbYW g0XQ== X-Gm-Message-State: APjAAAUYoGU5LSmEDwxe3vHcBhJdVSxtN6gW4ty0Fwq03sDK8tlcFlM8 O0SixXKpIOVSyxuE6zf97y4= X-Google-Smtp-Source: APXvYqzDHRpAsPfkhKUBRLTrZfx0UP4jc2Zkvevn7yj3F7lbulQ9X6QesXd9j9EMj7CbXGXPKAwt3g== X-Received: by 2002:a17:906:52d8:: with SMTP id w24mr81993966ejn.269.1560823402807; Mon, 17 Jun 2019 19:03:22 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id m3sm4052155edi.33.2019.06.17.19.03.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 19:03:22 -0700 (PDT) From: Nathan Chancellor To: Russell King Subject: [PATCH] ARM: iop13xx: Simplify iop13xx_atu{e,x}_pci_status checks Date: Mon, 17 Jun 2019 19:03:07 -0700 Message-Id: <20190618020307.50917-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190617_190327_485600_3531CE8E X-CRM114-Status: GOOD ( 10.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: clang-built-linux@googlegroups.com, Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP clang warns: arch/arm/mach-iop13xx/pci.c:292:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!iop13xx_atux_pci_status(1) == 0) ^ ~~ arch/arm/mach-iop13xx/pci.c:439:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!iop13xx_atue_pci_status(1) == 0) ^ ~~ !func() == 0 is equivalent to func(), which clears up this warning and makes the code more readable. Link: https://github.com/ClangBuiltLinux/linux/issues/543 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers --- arch/arm/mach-iop13xx/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 46ea06e906cc..94d30bc7bba1 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -289,7 +289,7 @@ iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where, if (size != 4) { val = iop13xx_atux_read(addr); - if (!iop13xx_atux_pci_status(1) == 0) + if (iop13xx_atux_pci_status(1)) return PCIBIOS_SUCCESSFUL; where = (where & 3) * 8; @@ -436,7 +436,7 @@ iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where, if (size != 4) { val = iop13xx_atue_read(addr); - if (!iop13xx_atue_pci_status(1) == 0) + if (iop13xx_atue_pci_status(1)) return PCIBIOS_SUCCESSFUL; where = (where & 3) * 8;