lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] test-hexdump.c: Fix initconst confusion
From
On Thu, Apr 9, 2015 at 1:52 AM, Andi Kleen <andi@firstfloor.org> wrote:
> On Wed, Apr 08, 2015 at 03:35:54PM -0700, Andrew Morton wrote:
>> >
>> > --- a/lib/test-hexdump.c
>> > +++ b/lib/test-hexdump.c
>> > @@ -18,26 +18,26 @@ static const unsigned char data_b[] = {
>> >
>> > static const unsigned char data_a[] = ".2.{....p..$}.4...1.....L...C...";
>> >
>> > -static const char *test_data_1_le[] __initconst = {
>> > +static const char * const test_data_1_le[] __initconst = {
>>
>> const char * const __initconst
>
> This one didn't cause any warnings elsewhere.
>
>>
>> > "be", "32", "db", "7b", "0a", "18", "93", "b2",
>> > "70", "ba", "c4", "24", "7d", "83", "34", "9b",
>> > "a6", "9c", "31", "ad", "9c", "0f", "ac", "e9",
>> > "4c", "d1", "19", "99", "43", "b1", "af", "0c",
>> > };
>> >
>> > +static const char *test_data_2_le[] __initdata = {
>> > +static const char *test_data_4_le[] __initdata = {
>> > +static const char *test_data_8_le[] __initdata = {
>>
>> const char * __initdata
>>
>> Why is test_data_1_le[] different?
>>
>> Can we make them all "const char * const __initconst"? That would make
>> checkpatch happy ;)
>
> I tried it, but it would have needed a lot more changes to shut up
> warnings later in the code. This was the least intrusive.

"a lot more changes" is "one more change"? (patch sent)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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


\
 
 \ /
  Last update: 2015-04-16 22:01    [W:0.065 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site