lkml.org 
[lkml]   [2010]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] printk.c: remove duplicate const
Date
On Thu, 01 Apr 2010 18:20:04 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: H Hartley Sweeten <hartleys@visionengravers.com>
> Date: Thu, 1 Apr 2010 20:13:27 -0500
>
> > Noticed during a sparse build.
> >
> > Signed-off-by: H Hartley Sweeten <hsweeten@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.



\
 
 \ /
  Last update: 2010-04-02 03:59    [W:0.171 / U:2.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site