From nobody Fri Sep 12 09:03:52 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E445FC636CC for ; Sat, 11 Feb 2023 08:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjBKIic (ORCPT ); Sat, 11 Feb 2023 03:38:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbjBKIi2 (ORCPT ); Sat, 11 Feb 2023 03:38:28 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 050B25BA6F for ; Sat, 11 Feb 2023 00:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1676104690; bh=U0bKiaplq61Guco79TNwC8jVqUG+62euLMzSu2HFW/E=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=Pz7yfvE06NvAn06ClytV36vxnns3qn4pwWFg6ukFF3WLSwu9Wp/6XjLEVCJ1kSy/x t2IJurv8jQHjT/JN9IyBMblD7Vuk2EgSyPj2nsyXJWhN/wmCiNfKuxAlHTdiahBWZD vkgeDWvLPqzCosQ/zHgbrVZjTRBMvuuxwFoo2h6k= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 11 Feb 2023 09:38:10 +0100 (CET) X-EA-Auth: rxPHzydya74rNLfmWzY+3kywbYLb5v43p16ZTDUoViOi8+cybvmA2qhJ+KsI13qPlokEhk0suKdVkZJQEQ1xdAncVGVkb6PD Date: Sat, 11 Feb 2023 14:08:01 +0530 From: Deepak R Varma To: Florian Fainelli , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: [PATCH] soc: brcmstb: pm-arm: Remove duplicate/repeating constant Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Constant DDR_PHY_RST_N is unnecessarily or'ed with itself. Remove the redundant constant from the expression. Issue identified using doublebitand.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- Please note: I was unable to build the change though I had the appropriate config, arch and cross compiler. I used the following: .config =3D bmips_stb_defconfig ARCH=3Dmips CROSS_COMPILE=3D/usr/bin/mips-linux-gnu- BRCMSTB_PM=3Dy Let me know what I missed so I can build the objects myself. Thank you. drivers/soc/bcm/brcmstb/pm/pm-arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/bcm/brcmstb/pm/pm-arm.c b/drivers/soc/bcm/brcmstb/= pm/pm-arm.c index d681cd24c6e1..633e715446f7 100644 --- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c +++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c @@ -288,7 +288,7 @@ static inline void s5entry_method1(void) /* Step 3: Channel A (RST_N =3D CKE =3D 0) */ tmp =3D readl_relaxed(ctrl.memcs[i].ddr_phy_base + ctrl.phy_a_standby_ctrl_offs); - tmp &=3D ~(DDR_PHY_RST_N | DDR_PHY_RST_N); + tmp &=3D ~DDR_PHY_RST_N; writel_relaxed(tmp, ctrl.memcs[i].ddr_phy_base + ctrl.phy_a_standby_ctrl_offs); =20 @@ -296,7 +296,7 @@ static inline void s5entry_method1(void) if (ctrl.phy_b_standby_ctrl_offs !=3D DDR_PHY_NO_CHANNEL) { tmp =3D readl_relaxed(ctrl.memcs[i].ddr_phy_base + ctrl.phy_b_standby_ctrl_offs); - tmp &=3D ~(DDR_PHY_RST_N | DDR_PHY_RST_N); + tmp &=3D ~DDR_PHY_RST_N; writel_relaxed(tmp, ctrl.memcs[i].ddr_phy_base + ctrl.phy_b_standby_ctrl_offs); } --=20 2.34.1