mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Adrian Bunk <bunk@stusta.de>
Cc: "Robert P. J. Day" <rpjday@mindspring.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: any value to "NORET_TYPE" macro?
Date: Tue, 22 May 2007 21:25:24 +0200	[thread overview]
Message-ID: <m3ejl8k6e3.fsf@maximus.localdomain> (raw)
In-Reply-To: <20070522161951.GC2098@stusta.de> (Adrian Bunk's message of "Tue, 22 May 2007 18:19:51 +0200")

Adrian Bunk <bunk@stusta.de> writes:

>> 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).

Actually it seems all the NORET_TYPEs are in fact (should be)
__attribute__((noreturn)) (2.6.21):

Almost certainly:
arch/mips/kernel/traps.c:NORET_TYPE void ATTRIB_NORET die()
arch/ia64/kernel/machine_kexec.c:typedef NORET_TYPE void ()(
arch/x86_64/kernel/machine_kexec.c:NORET_TYPE void machine_kexec()
arch/arm26/kernel/traps.c:NORET_TYPE void die()
arch/ppc/kernel/machine_kexec.c:typedef NORET_TYPE void ()(
arch/ppc/kernel/machine_kexec.c:NORET_TYPE void machine_kexec()
arch/ppc/amiga/config.c:static NORET_TYPE void amiga_reset()
arch/powerpc/kernel/machine_kexec.c:NORET_TYPE void machine_kexec()
arch/powerpc/kernel/machine_kexec_64.c:extern NORET_TYPE void kexec_sequence()
arch/powerpc/kernel/machine_kexec_32.c:typedef NORET_TYPE void ()(
arch/sh/kernel/machine_kexec.c:typedef NORET_TYPE void ()(
arch/sh/kernel/machine_kexec.c:NORET_TYPE void machine_kexec()
arch/arm/kernel/traps.c:NORET_TYPE void die()
arch/i386/kernel/machine_kexec.c:NORET_TYPE void machine_kexec()
arch/m68k/amiga/config.c:static NORET_TYPE void amiga_reset()
drivers/s390/s390mach.c:static NORET_TYPE void s390_handle_damage()
include/asm-i386/kexec.h:asmlinkage NORET_TYPE void
include/asm-mips/ptrace.h:extern NORET_TYPE void die();
include/asm-x86_64/kexec.h:NORET_TYPE void
include/linux/kexec.h:extern NORET_TYPE void machine_kexec() ATTRIB_NORET;
include/linux/linkage.h:#define NORET_TYPE    /**/
include/linux/kernel.h:NORET_TYPE void panic()
include/linux/kernel.h:fastcall NORET_TYPE void do_exit()
include/linux/kernel.h:NORET_TYPE void complete_and_exit()
include/linux/sched.h:extern NORET_TYPE void do_group_exit();
kernel/exit.c:fastcall NORET_TYPE void do_exit()
kernel/exit.c:NORET_TYPE void complete_and_exit()
kernel/exit.c:NORET_TYPE void do_group_exit()
kernel/panic.c:NORET_TYPE void panic()

The remaining 2 ones should most probably be removed, e2fsprogs
don't use it either (it was probably used by ext[23] in-kernel
code in the past):

include/linux/ext4_fs.h:# define NORET_TYPE    /**/
include/linux/ext3_fs.h:# define NORET_TYPE    /**/

-- 
Krzysztof Halasa

  parent reply	other threads:[~2007-05-22 19:25 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
2007-05-22 19:25       ` Krzysztof Halasa [this message]
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=m3ejl8k6e3.fsf@maximus.localdomain \
    --to=khc@pm.waw.pl \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@mindspring.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®