public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Kees Cook <keescook@chromium.org>,
	Christoph Hellwig <hch@infradead.org>,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	kernel-janitors@vger.kernel.org,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-geode@lists.infradead.org, linux-fbdev@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] video: constify geode ops structures
Date: Tue, 10 Nov 2015 14:17:12 -0800	[thread overview]
Message-ID: <1447193832.2701.102.camel@perches.com> (raw)
In-Reply-To: <20151110220244.GU7289@mwanda>

On Wed, 2015-11-11 at 01:02 +0300, Dan Carpenter wrote:
> On Tue, Nov 10, 2015 at 12:49:29PM -0800, Joe Perches wrote:
> > Is there a warning/info message produced by gcc and the
> > plug-in when a non-const declaration is converted to
> > const because of this attribute?
> 
> I'm not sure I understand the question.  What would the warning say?

Perhaps something like:

declaration of struct <foo> converted to const by __attribute__((do_const))

> We'll hopefully automatically make over 3000 structs const.  I
> understand warning that people should make structs const when possible
> but I don't understand why we would want to remove auto consting?

I'm not suggesting removing the attribute.
It seems sensible enough.

I just think the plug-in should at least optionally
note the instances when non-const declarations are
converted to const.

> Putting __do_const in the .h file is basically the same as marking
> every struct of that type as const in the .c file.

Not for a reader of the code that doesn't first
inspect the header files.


  reply	other threads:[~2015-11-10 22:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 21:34 [PATCH] video: constify geode ops structures Julia Lawall
2015-11-08 22:16 ` Dan Carpenter
2015-11-08 22:24   ` Julia Lawall
2015-11-09  5:42     ` Dan Carpenter
2015-11-09  6:09       ` Joe Perches
2015-11-09  6:39       ` Julia Lawall
2015-11-09 13:30         ` [kernel-hardening] " Dan Carpenter
2015-11-09 18:12           ` Julia Lawall
2015-11-09 18:19             ` Joe Perches
2015-11-09 13:49       ` Dan Carpenter
2015-11-09 14:50         ` Julia Lawall
2015-11-09 16:39           ` Dan Carpenter
2015-11-09 17:05           ` Emese Revfy
2015-11-09 17:48             ` Julia Lawall
2015-11-09 21:24               ` Kees Cook
2015-11-09 21:55                 ` Julia Lawall
2015-11-09 23:34                   ` Kees Cook
2015-11-10  1:24                     ` PaX Team
2015-11-10 15:44       ` Julia Lawall
2015-11-09 21:20   ` Kees Cook
2015-11-10  6:38     ` Christoph Hellwig
2015-11-10 20:34       ` Kees Cook
2015-11-10 20:49         ` Joe Perches
2015-11-10 22:02           ` Dan Carpenter
2015-11-10 22:17             ` Joe Perches [this message]
2015-11-10 22:34               ` Dan Carpenter
2015-11-10 22:39                 ` Joe Perches
2015-11-24 11:28 ` Tomi Valkeinen

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=1447193832.2701.102.camel@perches.com \
    --to=joe@perches.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=dan.carpenter@oracle.com \
    --cc=hch@infradead.org \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-geode@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@ti.com \
    /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