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, 16 Feb 2011 10:41:54 +0100
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	Andres Salomon <dilinger@...ued.net>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>, linux-kernel@...r.kernel.org,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Russell King <linux@....linux.org.uk>,
	Sascha Hauer <kernel@...gutronix.de>,
	Richard Purdie <rpurdie@...ys.net>,
	Liam Girdwood <lrg@...mlogic.co.uk>,
	linux-arm-kernel@...ts.infradead.org,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: Re: [PATCH 16/17] mc13xxx: mfd_cell is now implicitly available to
 drivers

On Fri, Feb 11, 2011 at 06:19:21PM -0800, Andres Salomon wrote:
> 
> The cell's platform_data is now accessed with a helper function;
> change clients to use that, and remove the now-unused data_size.
> 
> Note that mfd-core no longer makes a copy of platform_data, but the
why was this changed and where?  I'm not able to find your complete
series via gmane.

> mc13xxx-core driver creates the pdata structures on the stack.  In
> order to get around that, the various ARM mach types that set the
> pdata have been changed to hold the variable in static (global) memory.
> Also note that __initdata references in aforementioned pdata structs
> have been dropped.
> 
> Signed-off-by: Andres Salomon <dilinger@...ued.net>
> ---
>  arch/arm/mach-imx/mach-mx27_3ds.c     |    6 +++++-
>  arch/arm/mach-imx/mach-pcm038.c       |    6 +++++-
>  arch/arm/mach-mx3/mach-mx31_3ds.c     |    6 +++++-
>  arch/arm/mach-mx3/mach-mx31moboard.c  |    6 +++++-
>  drivers/leds/leds-mc13783.c           |    6 +++---
>  drivers/mfd/mc13xxx-core.c            |   18 +++++-------------
>  drivers/regulator/mc13783-regulator.c |    6 ++----
>  drivers/regulator/mc13892-regulator.c |    6 ++----
>  include/linux/mfd/mc13xxx.h           |    3 +--
>  9 files changed, 33 insertions(+), 30 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
> index 1643315..f223371 100644
> --- a/arch/arm/mach-imx/mach-mx27_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx27_3ds.c
> @@ -227,9 +227,13 @@ static struct mc13783_regulator_init_data mx27_3ds_regulators[] = {
>  };
>  
>  /* MC13783 */
> -static struct mc13783_platform_data mc13783_pdata __initdata = {
isn't using __initdata here broken already before your patch?  Was
introduced in c67a3e09.  Fabio?

But in general I'd prefer to keep as much __initdata as possible because
this occupies less memory when using a multi-machine kernel.

> diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
> index a1d391b..052b133 100644
> --- a/include/linux/mfd/mc13xxx.h
> +++ b/include/linux/mfd/mc13xxx.h
> @@ -146,8 +146,7 @@ struct mc13xxx_platform_data {
>  #define MC13XXX_USE_LED		(1 << 5)
>  	unsigned int flags;
>  
> -	int num_regulators;
> -	struct mc13xxx_regulator_init_data *regulators;
> +	struct mc13xxx_regulator_platform_data *regulators;
>  	struct mc13xxx_leds_platform_data *leds;
>  };
... so I'd prefer to embed a struct mc13xxx_regulator_platform_data into
mc13xxx_platform_data, not a pointer to it.  This makes initialisation a
bit easier, too.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
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