public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@queued.net>
To: linux-kernel@vger.kernel.org
Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Subject: Re: [PATCH] printk.c: remove duplicate const
Date: Thu, 1 Apr 2010 22:02:40 -0400	[thread overview]
Message-ID: <20100401220240.2b3c2c3b@debian> (raw)
In-Reply-To: <20100401.182004.197314081.davem@davemloft.net>

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.


      parent reply	other threads:[~2010-04-02  1:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  1:13 [PATCH] printk.c: remove duplicate const H Hartley Sweeten
2010-04-02  1:20 ` David Miller
2010-04-02  1:28   ` H Hartley Sweeten
2010-04-02  1:29     ` David Miller
2010-04-02  2:02   ` Andres Salomon [this message]

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=20100401220240.2b3c2c3b@debian \
    --to=dilinger@queued.net \
    --cc=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox