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:	Thu, 3 May 2012 08:39:56 +0200
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Rob Lee <rob.lee@...aro.org>
Cc:	kernel@...gutronix.de, shawn.guo@...aro.org,
	amit.kucheria@...aro.org, daniel.lezcano@...aro.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linaro-dev@...ts.linaro.org, patches@...aro.org, jj@...osbits.net
Subject: Re: [PATCH v2 2/3] ARM: imx: Add imx5 cpuidle driver

On Wed, May 02, 2012 at 03:11:35PM -0500, Rob Lee wrote:
> Sascha,
> 
> >>       mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
> >>       mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
> >> -     arm_pm_idle = imx5_idle;
> >> +     arm_pm_idle = (void *)imx5_idle;
> >
> > I don't like this. It will cover all warnings when the prototype of
> > arm_pm_idle changes in future. Better add a static void imx5_idle
> > which calls a static int imx5_do_idle, then you have an idle function
> > which returns an int.
> >
> 
> What about using the following:
> 
> arm_pm_idle =  (void (*)(void))imx5_idle;
> 
> This will give warnings if arm_pm_idle prototype changes.

This surely works but will look suspicious for people looking at the
code.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
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