From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Mike Turquette <mturquette@linaro.org>,
linux-samsung-soc@vger.kernel.org,
Heiko Stuebner <heiko@sntech.de>,
Tomasz Figa <tomasz.figa@gmail.com>,
Tero Kristo <t-kristo@ti.com>,
linux-rockchip@lists.infradead.org,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
kernel@pengutronix.de,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] clk: don't use __initconst for non-const arrays
Date: Fri, 12 Sep 2014 09:42:29 +0200 [thread overview]
Message-ID: <CAKv+Gu9LubyPHoYJsRfRoqgONAApb3nEoXAxUa9g6tecP=McOw@mail.gmail.com> (raw)
In-Reply-To: <20140911220445.GQ3755@pengutronix.de>
On 12 September 2014 00:04, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> Hello,
>
> On Thu, Sep 11, 2014 at 11:04:31PM +0200, Uwe Kleine-König wrote:
>> /* Mux parent lists. */
>> -static const char *fin_pll_p[] __initconst = {
>> +static const char *fin_pll_p[] __initdata = {
>> "xxti",
>> "xusbxti"
>> };
> As discussed with Tomasz on irc: The sad thing here is that for this
> array only 8 bytes are freed when .init.rodata is thrown away (that is
> two pointers). The actual data---5 + 8 bytes + maybe aligning---isn't
> freed though.
>
> We wondered if there is a nice and easy way to throw away the
> characters, too.
>
> The only way I currently see is:
>
> const char xxti[] __initconst = "xxti";
> ...
>
> static const char *fin_pll_p[] __initdata = {
> xxti,
> ...
> };
>
> but this definitively doesn't qualify as "nice and easy". Is there an
> alternative?
>
What about doing
static const char fin_pll_p[][8] __initconst = {
"xxti",
"xusbxti"
};
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: don't use __initconst for non-const arrays
Date: Fri, 12 Sep 2014 09:42:29 +0200 [thread overview]
Message-ID: <CAKv+Gu9LubyPHoYJsRfRoqgONAApb3nEoXAxUa9g6tecP=McOw@mail.gmail.com> (raw)
In-Reply-To: <20140911220445.GQ3755@pengutronix.de>
On 12 September 2014 00:04, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> Hello,
>
> On Thu, Sep 11, 2014 at 11:04:31PM +0200, Uwe Kleine-K?nig wrote:
>> /* Mux parent lists. */
>> -static const char *fin_pll_p[] __initconst = {
>> +static const char *fin_pll_p[] __initdata = {
>> "xxti",
>> "xusbxti"
>> };
> As discussed with Tomasz on irc: The sad thing here is that for this
> array only 8 bytes are freed when .init.rodata is thrown away (that is
> two pointers). The actual data---5 + 8 bytes + maybe aligning---isn't
> freed though.
>
> We wondered if there is a nice and easy way to throw away the
> characters, too.
>
> The only way I currently see is:
>
> const char xxti[] __initconst = "xxti";
> ...
>
> static const char *fin_pll_p[] __initdata = {
> xxti,
> ...
> };
>
> but this definitively doesn't qualify as "nice and easy". Is there an
> alternative?
>
What about doing
static const char fin_pll_p[][8] __initconst = {
"xxti",
"xusbxti"
};
next prev parent reply other threads:[~2014-09-12 7:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 21:04 [PATCH] clk: don't use __initconst for non-const arrays Uwe Kleine-König
2014-09-11 21:04 ` Uwe Kleine-König
2014-09-11 21:48 ` Tomasz Figa
2014-09-11 21:48 ` Tomasz Figa
2014-09-11 22:04 ` Uwe Kleine-König
2014-09-11 22:04 ` Uwe Kleine-König
2014-09-12 7:42 ` Ard Biesheuvel [this message]
2014-09-12 7:42 ` Ard Biesheuvel
2014-09-12 7:59 ` Uwe Kleine-König
2014-09-12 7:59 ` Uwe Kleine-König
2015-02-18 9:59 Uwe Kleine-König
2015-03-25 10:41 ` Uwe Kleine-König
2015-04-13 0:20 ` Michael Turquette
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKv+Gu9LubyPHoYJsRfRoqgONAApb3nEoXAxUa9g6tecP=McOw@mail.gmail.com' \
--to=ard.biesheuvel@linaro.org \
--cc=heiko@sntech.de \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=t-kristo@ti.com \
--cc=tomasz.figa@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.