From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Satyam Sharma <satyam.sharma@gmail.com>
Cc: Adrian Bunk <bunk@stusta.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: any value to "NORET_TYPE" macro?
Date: Tue, 22 May 2007 13:18:23 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0705221309550.16873@localhost.localdomain> (raw)
In-Reply-To: <a781481a0705221004t4058154akb8b142dfdd2d6073@mail.gmail.com>
On Tue, 22 May 2007, Satyam Sharma wrote:
> On 5/22/07, Adrian Bunk <bunk@stusta.de> wrote:
> > On Tue, May 22, 2007 at 10:04:16AM -0400, Robert P. J. Day wrote:
...
> > > no, i think you're thinking of the alternative ATTRIB_NORET
> > > macro. as you can read in my previous post, NORET_TYPE used to
> > > resolve to "__volatile__" for very old gcc. so i think it's
> > > legitimately dead and can be ripped out.
> >
> > No doubt that it could be removed because it doesn't have any
> > effect.
> >
> > But locking at the usages, it seems to have been used when people
> > thought it was what __noreturn now is, so replacing NORET_TYPE
> > with __noreturn might be a small optimization (but every
> > NORET_TYPE should be checked that it's actually correct).
>
> Adrian's right, and in fact from ...
>
> http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
>
> ... we know why that macro existed and evaluated to __volatile__ for
> pre-2.5 gcc. Perhaps most of today's users of NORET_TYPE were
> probably looking for ATTRIB_NORET (which is quite common) actually.
>
> [ __noreturn is defined in compiler-gcc.h, so the easier way would
> be to kill NORET_TYPE and replace its usages with ATTRIB_NORET
> instead. Of course, after verifying that the function _really_ never
> returns. ]
oh, barf. why does this always happen to me? :-) i just verified
that a patch i threw together to rid the tree of NORET_TYPE does in
fact (and not surprisingly) produce *exactly* the same 7000+ lines of
output and, based on what we've established so far, that's exactly
what it should have done.
at this point, i'd prefer to submit that patch as is for a couple
reasons. first, it's a no-brainer if all it does is remove every
reference to NORET_TYPE and leave everything else untouched. if i go
beyond that, then i'm starting to make judgment calls and possibly
changing the logic, which makes this a totally different cleanup job.
also, in a number of cases, there are some routines that are qualified
with *both* NORET_TYPE and ATTRIB_NORET, suggesting that some
developers knew very well what the difference was, and i was going to
deal with all that ATTRIB_NORET nonsense in another pass.
in short, i'd rather keep this as an aesthetic, no-op kind of cleanup,
otherwise, i just *know* things are going to get ugly. the final
patch will follow shortly.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
next prev parent reply other threads:[~2007-05-22 17:20 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 13:09 Robert P. J. Day
2007-05-22 13:53 ` John Anthony Kazos Jr.
2007-05-22 14:01 ` Robert P. J. Day
2007-05-22 14:09 ` Satyam Sharma
2007-05-22 14:16 ` Satyam Sharma
2007-05-22 14:43 ` Krzysztof Halasa
2007-05-22 15:24 ` Satyam Sharma
2007-05-22 19:45 ` Geert Uytterhoeven
2007-05-22 14:47 ` Robert P. J. Day
2007-05-22 13:59 ` Adrian Bunk
2007-05-22 14:04 ` Robert P. J. Day
2007-05-22 16:19 ` Adrian Bunk
2007-05-22 17:04 ` Satyam Sharma
2007-05-22 17:18 ` Robert P. J. Day [this message]
2007-05-22 19:25 ` Krzysztof Halasa
2007-05-22 20:17 ` Robert P. J. Day
2007-05-22 20:39 ` Krzysztof Halasa
2007-05-23 8:37 ` Satyam Sharma
2007-05-23 13:09 ` Robert P. J. Day
2007-05-23 13:46 ` Satyam Sharma
2007-05-24 13:10 ` Krzysztof Halasa
2007-05-24 13:25 ` Robert P. J. Day
2007-05-24 17:12 ` Satyam Sharma
2007-05-24 16:43 ` Robert P. J. Day
2007-05-24 18:53 ` Satyam Sharma
2007-05-25 17:33 ` Robert P. J. Day
2007-05-25 17:36 ` Robert P. J. Day
2007-05-25 19:25 ` Satyam Sharma
2007-05-25 19:40 ` Robert P. J. Day
2007-05-25 21:46 ` Adrian Bunk
2007-05-26 21:56 ` Krzysztof Halasa
2007-05-22 22:41 ` Krzysztof Halasa
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=Pine.LNX.4.64.0705221309550.16873@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=satyam.sharma@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
all inboxes | Powered by JetHome®