lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 11 Feb 2023 15:55:48 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Deepak R Varma <drv@...lo.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     Saurabh Singh Sengar <ssengar@...rosoft.com>,
        Praveen Kumar <kumarpraveen@...ux.microsoft.com>
Subject: Re: [PATCH] soc: brcmstb: pm-arm: Remove duplicate/repeating constant

Le 11/02/2023 à 09:38, Deepak R Varma a écrit :
> 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 <drv@...lo.com>
> ---
> 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

The driver is pm-arm.c, try with arm instead of mips?

Worked for me with make.cross

> 
> 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;

Based on step 3 comment above, maybe:

  -		tmp &= ~(DDR_PHY_RST_N | DDR_PHY_RST_N);
  +		tmp &= ~(DDR_PHY_RST_N | DDR_PHY_CKE);

?
>   		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;

No such comment, but the code looks the same, so...

CJ

>   			writel_relaxed(tmp, ctrl.memcs[i].ddr_phy_base +
>   				     ctrl.phy_b_standby_ctrl_offs);
>   		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ