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:	Tue, 2 Nov 2010 22:21:11 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Dinh.Nguyen@...escale.com
Cc:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	s.hauer@...gutronix.de, u.kleine-koenig@...gutronix.de,
	valentin.longchamp@...l.ch, daniel@...aq.de,
	grant.likely@...retlab.ca, amit.kucheria@...onical.com,
	xiao-lizhang@...escale.com
Subject: Re: [PATCH 2/2] ARM: imx: Add mx53 support to common msl functions.

On Tue, Nov 02, 2010 at 05:17:07PM -0500, Dinh.Nguyen@...escale.com wrote:
>  static void query_silicon_parameter(void)
>  {
> -	void __iomem *rom = ioremap(MX51_IROM_BASE_ADDR, MX51_IROM_SIZE);
> +	void __iomem *rom;
>  	u32 rev;
>  
> +	if (cpu_is_mx51())
> +		rom = ioremap(MX51_IROM_BASE_ADDR, MX51_IROM_SIZE);
> +	else if (cpu_is_mx53())
> +		rom = ioremap(MX53_IROM_BASE_ADDR, MX53_IROM_SIZE);

	else
		rom is uninitialized;

I'd also suggest that the above set two variables - base and size, rather
than repeating the ioremap.  If you look at the generated code, I suspect
you'll find that the above generates two ioremap calls, whereas using
variables for base and size, and having a common ioremap will reduce the
code size.
--
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