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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 7 Jun 2015 09:02:23 +0200
From:	Michael Büsch <m@...s.ch>
To:	Hauke Mehrtens <hauke@...ke-m.de>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	linux-mips@...ux-mips.org
Subject: Re: [PATCH] ssb: fix handling of ssb_pmu_get_alp_clock()

On Sun,  7 Jun 2015 01:52:51 +0200
Hauke Mehrtens <hauke@...ke-m.de> wrote:

> Dan Carpenter reported missing brackets which resulted in reading a
> wrong crystalfreq value. I also noticed that the result of this
> function is ignored.
> 
> Reported-By: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Hauke Mehrtens <hauke@...ke-m.de>
> ---
>  drivers/ssb/driver_chipcommon_pmu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c
> index 0942841..c5352ea 100644
> --- a/drivers/ssb/driver_chipcommon_pmu.c
> +++ b/drivers/ssb/driver_chipcommon_pmu.c
> @@ -621,8 +621,8 @@ static u32 ssb_pmu_get_alp_clock_clk0(struct ssb_chipcommon *cc)
>  	u32 crystalfreq;
>  	const struct pmu0_plltab_entry *e = NULL;
>  
> -	crystalfreq = chipco_read32(cc, SSB_CHIPCO_PMU_CTL) &
> -		      SSB_CHIPCO_PMU_CTL_XTALFREQ >> SSB_CHIPCO_PMU_CTL_XTALFREQ_SHIFT;
> +	crystalfreq = (chipco_read32(cc, SSB_CHIPCO_PMU_CTL) &
> +		       SSB_CHIPCO_PMU_CTL_XTALFREQ)  >> SSB_CHIPCO_PMU_CTL_XTALFREQ_SHIFT;
>  	e = pmu0_plltab_find_entry(crystalfreq);
>  	BUG_ON(!e);
>  	return e->freq * 1000;
> @@ -634,7 +634,7 @@ u32 ssb_pmu_get_alp_clock(struct ssb_chipcommon *cc)
>  
>  	switch (bus->chip_id) {
>  	case 0x5354:
> -		ssb_pmu_get_alp_clock_clk0(cc);
> +		return ssb_pmu_get_alp_clock_clk0(cc);
>  	default:
>  		ssb_err("ERROR: PMU alp clock unknown for device %04X\n",
>  			bus->chip_id);

Looks good.
Signed-off-by: Michael Buesch <m@...s.ch>

Can some MIPS people take this, please?

-- 
Michael

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ