From patchwork Sat Feb 11 08:38:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 55747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1399144wrn; Sat, 11 Feb 2023 00:42:15 -0800 (PST) X-Google-Smtp-Source: AK7set/ShMFwb1upiiJghUafFfflUJ+R2lqolUNt6aL369Vaw5YB7SobWLyNuKmdPuV3HuMC+p96 X-Received: by 2002:a17:906:160c:b0:8af:2f65:c9b0 with SMTP id m12-20020a170906160c00b008af2f65c9b0mr8509131ejd.13.1676104934944; Sat, 11 Feb 2023 00:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676104934; cv=none; d=google.com; s=arc-20160816; b=wcUuxkUbmv7A9K9Cg916UrOvmsGuYFktgTFpELa1t2J3MYJbGUwt8KhW1frtQ8j/LI H4Lff9IoEZHuOHRsuSsSR7In3LamrUns9SOJQnQ50SPyCNBgoXQ1yhuMaz6fx2cGQIsn KnkokVtXEKllyhSR4McqvvQfEyoZRhkUSFMk4pGZxojSTmD5RHRc+Edro+JUIGT7hgun qwtRNmvcKalBxy3w3y4dkruOwNOZAfxqaXvXLcf310r6atzFd1BLyAy07/4jhXD49zTY h9vOIgPUPCgRFpvvJvPDqICmdhzHNlBs3ROMY7O+8yLoOFUBI/35jGpGhBFJBOvaQaot rurw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=HDN/iUbYRp2UIEOgHBn3w4AHpYMHKsMewuxin7i38cs=; b=IhLsJHEduY445pL0CjFmhybIvZHqdPZKNkpUHNcUV8hBUNqeDYXEtvPyVwskw49v7C 212fqsFybZEc4f9+VzOwYDwNMHy7PgzBALvCFv+rBQhzf6MXYB24cN219JeaJka+JSgj +IGz6J5zUHzmTWoWacgbGggtGH13k5fu9gJxcygOE+5HEYIzmlbw/HbGnlESmgsaGsMN GKqgMXtE1wyckhGTZyyxubYZyddHWGoHVFAFK+r/1YybTk7bHaBaQUDGGcFNJWTPRoJg eBtOZlja4OeIqf+lrcnYrTfd2DueWnNi9362/gZWp8s0HWnnFqBGnnuj90JoouYX9nda hrhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Pz7yfvE0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ep17-20020a1709069b5100b00889d43c89easi7238264ejc.313.2023.02.11.00.41.52; Sat, 11 Feb 2023 00:42:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Pz7yfvE0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjBKIib (ORCPT + 99 others); Sat, 11 Feb 2023 03:38:31 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757523408385951824?= X-GMAIL-MSGID: =?utf-8?q?1757523408385951824?= 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 = bmips_stb_defconfig ARCH=mips CROSS_COMPILE=/usr/bin/mips-linux-gnu- BRCMSTB_PM=y 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 = CKE = 0) */ tmp = readl_relaxed(ctrl.memcs[i].ddr_phy_base + ctrl.phy_a_standby_ctrl_offs); - tmp &= ~(DDR_PHY_RST_N | DDR_PHY_RST_N); + tmp &= ~DDR_PHY_RST_N; writel_relaxed(tmp, ctrl.memcs[i].ddr_phy_base + ctrl.phy_a_standby_ctrl_offs); @@ -296,7 +296,7 @@ static inline void s5entry_method1(void) if (ctrl.phy_b_standby_ctrl_offs != DDR_PHY_NO_CHANNEL) { tmp = readl_relaxed(ctrl.memcs[i].ddr_phy_base + ctrl.phy_b_standby_ctrl_offs); - tmp &= ~(DDR_PHY_RST_N | DDR_PHY_RST_N); + tmp &= ~DDR_PHY_RST_N; writel_relaxed(tmp, ctrl.memcs[i].ddr_phy_base + ctrl.phy_b_standby_ctrl_offs); }