From patchwork Fri Jan 7 18:33:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12706924 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21DFAC433F5 for ; Fri, 7 Jan 2022 18:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=9+8KZAFKnhygxdmO7zsqsyzrEWdiGc4HB0z6vOYnNnM=; b=e+gpRiKoDpldu0 LTFPPM6bhHnOeK8ATbNjqIhh7lz1+OxblOoRCYeqET8uwxoAQiKRQrYeXL5HWKs85Kf3gG2Z+bToF OO6za4+j+W7JGUxUO5WTvzplkcUmIewkZp2JW8+ZsGu6FodWPhSbRJdjNXZfnXIL6uKaugnV5spKr fEdVwIu/5wQVW9+w0qQxCSURVER7ZwpmwnM5zqhiTDjLURsmzK3iyGsZbtK9V/lsGnqKcXY9j6ZvM aFn7lVHW3uJYltdFAK0Q9fL4nAamUicwskpAMCbQhVkIkI9tF9KojL9wWywO3ImpTXwplXA0S+7aB i3FGX7Dg0KP1Y5rJjJyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5u3T-004uLY-7d; Fri, 07 Jan 2022 18:33:35 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5u3P-004uKR-ON for linux-arm-kernel@lists.infradead.org; Fri, 07 Jan 2022 18:33:33 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 65754B82705; Fri, 7 Jan 2022 18:33:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 370CAC36AE0; Fri, 7 Jan 2022 18:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641580409; bh=/O1V8c1GBTvHNkBLACc6ZOiDCdYgbkOd1VzcLgA42jQ=; h=From:To:Cc:Subject:Date:From; b=M0Y7keVE7rrIVFdBNO2atcUnhA56BhFQhTy1L6AXowSSUPb//mMnH+ghuIu4c+CIx 6k1rIi6UQXJrePHrjoTP3MLNOnTYDSjqB/hFxeMY4Udoqwp/XR2JXDnLCY2hjSUBVb NWrJ3WqCpMws10Xc8E4w5B2Y8vqEHKQfnS6WvMlzEP7TIXR+0XeFBW8pC+/aJ45O8w BMplBOHZuxZKI5Y1YuF8gZYj3TYx6yxT1tvktM2GWiKOhMxIk7khsKD4td8WjgnSwF pNmdl10WxB9p4LY7d6rQiAUBqYdf2zBOWCe7I1UV5/yH8uCchTmkvWN41cJw2eJmQC vchUXo9JjGqPQ== From: Nathan Chancellor To: Michael Turquette , Stephen Boyd , Nobuhiro Iwamatsu Cc: Nick Desaulniers , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , kernel test robot Subject: [PATCH] clk: visconti: Remove pointless NULL check in visconti_pll_add_lookup() Date: Fri, 7 Jan 2022 11:33:03 -0700 Message-Id: <20220107183303.2337676-1-nathan@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220107_103332_590905_3939F472 X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Clang warns: drivers/clk/visconti/pll.c:292:20: warning: address of array 'ctx->clk_data.hws' will always evaluate to 'true' [-Wpointer-bool-conversion] if (ctx->clk_data.hws && id) ~~~~~~~~~~~~~~^~~ ~~ 1 warning generated. This array cannot be NULL if ctx is not NULL, which is allocated in visconti_init_pll(), so just remove the check, which matches other clk drivers. Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and reset driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1564 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Acked-by: Nobuhiro Iwamatsu --- drivers/clk/visconti/pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 70faf946ad975c64efb2eb809f9139f304a494b0 diff --git a/drivers/clk/visconti/pll.c b/drivers/clk/visconti/pll.c index 3b6e88bb73d5..a2398bc6c6e4 100644 --- a/drivers/clk/visconti/pll.c +++ b/drivers/clk/visconti/pll.c @@ -289,7 +289,7 @@ static void visconti_pll_add_lookup(struct visconti_pll_provider *ctx, struct clk_hw *hw_clk, unsigned int id) { - if (ctx->clk_data.hws && id) + if (id) ctx->clk_data.hws[id] = hw_clk; }