Re: [PATCH 1/6] mmc: sh_mobile_sdhi: don't use array for DT configs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wolfram,

On Wed, Apr 6, 2016 at 11:25 AM, Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote:
> From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
>
> We won't access an index based array to get our DT config, but create
> seperate structs instead. So, remove the array which only wastes memory.

While I agree with your patch, I don't agree with the memory consumption
comment...

It does remove 2 lines of source code ;-)

> --- a/drivers/mmc/host/sh_mobile_sdhi.c
> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> @@ -51,10 +51,8 @@ struct sh_mobile_sdhi_of_data {
>         unsigned bus_shift;
>  };
>
> -static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
> -       {
> -               .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
> -       },

Array of a single element.

> +static const struct sh_mobile_sdhi_of_data of_default_cfg = {
> +       .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
>  };

Single element.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux