From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D06DAC432C0 for ; Tue, 3 Dec 2019 23:08:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 998B12064B for ; Tue, 3 Dec 2019 23:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575414508; bh=7Okz4y6hrxVIRsklu/VZlG95BXottGN8NoHpUOaltx0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RyHUeiY725msnIqJkmiwkpV0KXPF/NNWTVr1o7alJ2gRyiPpwoep84K214rHqA4Mj Vd9/j9lU4MC4KsD68+UVVpHn8hpswx2lMZ3sy8uqOAb0kJccKLlMMPJV8xEnvvp5W9 1N3yHiZnVZcpiXxkp/eYL/MzsmmPWHB99OFwPXDQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729387AbfLCXI2 (ORCPT ); Tue, 3 Dec 2019 18:08:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:34440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728955AbfLCWpl (ORCPT ); Tue, 3 Dec 2019 17:45:41 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 773C620803; Tue, 3 Dec 2019 22:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575413140; bh=7Okz4y6hrxVIRsklu/VZlG95BXottGN8NoHpUOaltx0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MDhzB0/CDANCc9fu8m+PnRzqtzWvpFBOyvFlE62jVYhoD4SKknOUIcox+Kk9DVcKe QjZpMuKzC4IDOn5qLX5Yqk3Y2AOgDbFElTj+NgCvC5XV9pcB1t/5jSjkX5v59hEj+n 8OdkAwIJ7zCIABWYTVrXi69cPWQXwpU0+nwwqcug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Maxime Ripard , Sasha Levin Subject: [PATCH 4.19 015/321] clk: sunxi-ng: a80: fix the zeroing of bits 16 and 18 Date: Tue, 3 Dec 2019 23:31:21 +0100 Message-Id: <20191203223427.914558380@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191203223427.103571230@linuxfoundation.org> References: <20191203223427.103571230@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King [ Upstream commit cdfc2e2086bf9c465f44e2db25561373b084a113 ] The zero'ing of bits 16 and 18 is incorrect. Currently the code is masking with the bitwise-and of BIT(16) & BIT(18) which is 0, so the updated value for val is always zero. Fix this by bitwise and-ing value with the correct mask that will zero bits 16 and 18. Addresses-Coverity: (" Suspicious &= or |= constant expression") Fixes: b8eb71dcdd08 ("clk: sunxi-ng: Add A80 CCU") Signed-off-by: Colin Ian King Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun9i-a80.c b/drivers/clk/sunxi-ng/ccu-sun9i-a80.c index 8936ef87652c0..c14bf782b2b33 100644 --- a/drivers/clk/sunxi-ng/ccu-sun9i-a80.c +++ b/drivers/clk/sunxi-ng/ccu-sun9i-a80.c @@ -1231,7 +1231,7 @@ static int sun9i_a80_ccu_probe(struct platform_device *pdev) /* Enforce d1 = 0, d2 = 0 for Audio PLL */ val = readl(reg + SUN9I_A80_PLL_AUDIO_REG); - val &= (BIT(16) & BIT(18)); + val &= ~(BIT(16) | BIT(18)); writel(val, reg + SUN9I_A80_PLL_AUDIO_REG); /* Enforce P = 1 for both CPU cluster PLLs */ -- 2.20.1