From: David Miller on
From: H Hartley Sweeten <hartleys(a)visionengravers.com>
Date: Thu, 1 Apr 2010 20:28:33 -0500

> Isn't that a C++ and not a C feature?

I don't think so.

> If it is valid in C then I guess the sparse people should be informed.

Perhaps.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: H Hartley Sweeten on
On Thursday, April 01, 2010 6:20 PM, David Miller wrote:
> From: H Hartley Sweeten <hartleys(a)visionengravers.com>
> Date: Thu, 1 Apr 2010 20:13:27 -0500
>
>> Noticed during a sparse build.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten(a)visionengravers.com>
>
> Isn't it intentional? The two consts mark different aspects
> of the declaration const, both the pointers as well as the
> contents pointed to.

Isn't that a C++ and not a C feature?

If it is valid in C then I guess the sparse people should be informed.

Regards,
Hartley--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andres Salomon on
On Thu, 01 Apr 2010 18:20:04 -0700 (PDT)
David Miller <davem(a)davemloft.net> wrote:

> From: H Hartley Sweeten <hartleys(a)visionengravers.com>
> Date: Thu, 1 Apr 2010 20:13:27 -0500
>
> > Noticed during a sparse build.
> >
> > Signed-off-by: H Hartley Sweeten <hsweeten(a)visionengravers.com>
>
> Isn't it intentional? The two consts mark different aspects
> of the declaration const, both the pointers as well as the
> contents pointed to.


I believe that'd be -

static const char *const kmsg_reasons[]

rather than what was originally in the code -

static const char const *kmsg_reasons[]

Read right-to-left, the first is a constant pointer to a char constant;
the second is a pointer to a constant character constant. I suspect
the first is what was intended.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/