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:	Wed, 26 Aug 2015 15:55:54 -0500
From:	Scott Wood <scottwood@...escale.com>
To:	Chenhui Zhao <chenhui.zhao@...escale.com>
CC:	<linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
	<Jason.Jin@...escale.com>
Subject: Re: [PATCH v2,4/5] PowerPC/mpc85xx: Add hotplug support on E5500 and
 E500MC cores

On Wed, Aug 26, 2015 at 08:09:47PM +0800, Chenhui Zhao wrote:
> +int check_cpu_dead(unsigned int cpu)
> +{
> +	return per_cpu(cpu_state, cpu) == CPU_DEAD;
> +}

I'm not sure this needs to be a function versus open-coded, but if you do
want to make it a function, make it more obvious from the caller side by
changing it to:

bool is_cpu_dead(unsigned int cpu);

Otherwise if I see "if (check_cpu_dead(cpu))" I don't know if the
if-block is executed if the CPU is dead or if it isn't.

> diff --git a/arch/powerpc/platforms/85xx/smp.h b/arch/powerpc/platforms/85xx/smp.h
> index 0b20ae3..8ee19a3 100644
> --- a/arch/powerpc/platforms/85xx/smp.h
> +++ b/arch/powerpc/platforms/85xx/smp.h
> @@ -6,6 +6,7 @@
>  #ifdef CONFIG_SMP
>  void __init mpc85xx_smp_init(void);
>  int __init mpc85xx_setup_pmc(void);
> +int __init fsl_rcpm_init(void);
>  #else

Why wasn't this added in the patch that added fsl_rcpm_init()?

-Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ