* [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
@ 2018-03-23 22:58 Rafał Miłecki
2018-03-24 0:52 ` Aaro Koskinen
2018-04-23 4:51 ` Rafał Miłecki
0 siblings, 2 replies; 4+ messages in thread
From: Rafał Miłecki @ 2018-03-23 22:58 UTC (permalink / raw)
To: linux-mips, Ralf Baechle
Cc: Hauke Mehrtens, James Hogan, Dan Haab, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This struct variable is used during init only. It gets passed to the
gpio_led_register_device() which creates its own data copy. That allows
using __initdata and saving some minimal amount of memory.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
arch/mips/bcm47xx/leds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
index 8307a8a02667..fb87a6c54bc9 100644
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -521,7 +521,7 @@ bcm47xx_leds_simpletech_simpleshare[] __initconst = {
* Init
**************************************************/
-static struct gpio_led_platform_data bcm47xx_leds_pdata;
+static struct gpio_led_platform_data bcm47xx_leds_pdata __initdata;
#define bcm47xx_set_pdata(dev_leds) do { \
bcm47xx_leds_pdata.leds = dev_leds; \
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
2018-03-23 22:58 [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata Rafał Miłecki
@ 2018-03-24 0:52 ` Aaro Koskinen
2018-04-23 4:51 ` Rafał Miłecki
1 sibling, 0 replies; 4+ messages in thread
From: Aaro Koskinen @ 2018-03-24 0:52 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-mips, Ralf Baechle, Hauke Mehrtens, James Hogan, Dan Haab,
Rafał Miłecki
Hi,
On Fri, Mar 23, 2018 at 11:58:07PM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This struct variable is used during init only. It gets passed to the
> gpio_led_register_device() which creates its own data copy. That allows
> using __initdata and saving some minimal amount of memory.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Aaro Koskinen <aaro.koskinen@iki.fi>
A.
> ---
> arch/mips/bcm47xx/leds.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
> index 8307a8a02667..fb87a6c54bc9 100644
> --- a/arch/mips/bcm47xx/leds.c
> +++ b/arch/mips/bcm47xx/leds.c
> @@ -521,7 +521,7 @@ bcm47xx_leds_simpletech_simpleshare[] __initconst = {
> * Init
> **************************************************/
>
> -static struct gpio_led_platform_data bcm47xx_leds_pdata;
> +static struct gpio_led_platform_data bcm47xx_leds_pdata __initdata;
>
> #define bcm47xx_set_pdata(dev_leds) do { \
> bcm47xx_leds_pdata.leds = dev_leds; \
> --
> 2.11.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
2018-03-23 22:58 [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata Rafał Miłecki
2018-03-24 0:52 ` Aaro Koskinen
@ 2018-04-23 4:51 ` Rafał Miłecki
2018-04-24 10:47 ` James Hogan
1 sibling, 1 reply; 4+ messages in thread
From: Rafał Miłecki @ 2018-04-23 4:51 UTC (permalink / raw)
To: linux-mips@linux-mips.org, Ralf Baechle
Cc: Hauke Mehrtens, James Hogan, Dan Haab, Rafał Miłecki
On 23 March 2018 at 23:58, Rafał Miłecki <zajec5@gmail.com> wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This struct variable is used during init only. It gets passed to the
> gpio_led_register_device() which creates its own data copy. That allows
> using __initdata and saving some minimal amount of memory.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
James, would you care to take this trivial patch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
2018-04-23 4:51 ` Rafał Miłecki
@ 2018-04-24 10:47 ` James Hogan
0 siblings, 0 replies; 4+ messages in thread
From: James Hogan @ 2018-04-24 10:47 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-mips@linux-mips.org, Ralf Baechle, Hauke Mehrtens, Dan Haab,
Rafał Miłecki
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
On Mon, Apr 23, 2018 at 06:51:35AM +0200, Rafał Miłecki wrote:
> On 23 March 2018 at 23:58, Rafał Miłecki <zajec5@gmail.com> wrote:
> > From: Rafał Miłecki <rafal@milecki.pl>
> >
> > This struct variable is used during init only. It gets passed to the
> > gpio_led_register_device() which creates its own data copy. That allows
> > using __initdata and saving some minimal amount of memory.
> >
> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>
> James, would you care to take this trivial patch?
Yes, applied for 4.18
Thanks
James
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-24 10:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-23 22:58 [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata Rafał Miłecki
2018-03-24 0:52 ` Aaro Koskinen
2018-04-23 4:51 ` Rafał Miłecki
2018-04-24 10:47 ` James Hogan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox