public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	re.emese@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 28/31] Constify struct super_operations for 2.6.32 v1
Date: Wed, 9 Dec 2009 01:45:59 +0000	[thread overview]
Message-ID: <20091209014559.GP14381@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20091209013109.GA18448@linux-mips.org>

On Wed, Dec 09, 2009 at 01:31:10AM +0000, Ralf Baechle wrote:
> On Sun, Dec 06, 2009 at 08:14:46AM +0300, Alexey Dobriyan wrote:
> 
> > Subject: Re: [PATCH 28/31] Constify struct super_operations for 2.6.32 v1
> > Content-Type: text/plain; charset=ISO-8859-1
> > 
> > > -   	struct inode *(*alloc_inode)(struct super_block *sb);
> > > +   	struct inode *(* const alloc_inode)(struct super_block *sb);
> > 
> > Good rule is if adding const doesn't move object from one section
> > to another, it isn't worth it.
> 
> On MIPS I've changed a few pointer arguments that frequently were abused
> by platform-specific code to const just to make sure such code blows up
> at compile time and not later in my mail folder at review time.

Seriously, folks, that looks like a fun sparse project: new type attribute
that makes pointer conversions complain (inherited by aggregates containing
one of such things) + one that restricts storage classes (again, inherited
the same way).  Another fun attribute: "no embedding into other objects".
__force casts would suppress complaints in places where e.g. noconvert
objects get allocated.

  reply	other threads:[~2009-12-09  1:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06  5:14 [PATCH 28/31] Constify struct super_operations for 2.6.32 v1 Alexey Dobriyan
2009-12-06 14:23 ` Emese Revfy
2009-12-07 18:30   ` Alexey Dobriyan
2009-12-08  0:06     ` Emese Revfy
2009-12-08  1:51       ` Al Viro
2009-12-09  0:24         ` Emese Revfy
2009-12-09  0:47           ` Al Viro
2009-12-09  8:22             ` Olivier Galibert
2009-12-10 18:24             ` Emese Revfy
2009-12-09  1:31 ` Ralf Baechle
2009-12-09  1:45   ` Al Viro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-12-04 22:00 [PATCH 00/31] constify various _ops structures " Emese Revfy
2009-12-04 22:47 ` [PATCH 28/31] Constify struct super_operations " Emese Revfy
2009-12-06  1:23   ` Al Viro
2009-12-06  1:41     ` Emese Revfy

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=20091209014559.GP14381@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=re.emese@gmail.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