Skip to content

Commit

Permalink
[MIPS] Transform old-style macros to newer "__noreturn"
Browse files Browse the repository at this point in the history
Convert old/obsolete NORET_TYPE and ATTRIB_NORET macros to use the
newer standard of "__noreturn" as defined in compiler-gcc.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Robert P. J. Day authored and Ralf Baechle committed Jul 10, 2007
1 parent 8f8771a commit b3f6df9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion arch/mips/dec/prom/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void __init which_prom(s32 magic, s32 *prom_vec)

void __init prom_init(void)
{
extern void ATTRIB_NORET dec_machine_halt(void);
extern void dec_machine_halt(void);
static char cpu_msg[] __initdata =
"Sorry, this kernel is compiled for a wrong CPU type!\n";
s32 argc = fw_arg0;
Expand Down
10 changes: 5 additions & 5 deletions arch/mips/dec/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@

#include <asm/addrspace.h>

typedef void ATTRIB_NORET (* noret_func_t)(void);
typedef void __noreturn (* noret_func_t)(void);

static inline void ATTRIB_NORET back_to_prom(void)
static inline void __noreturn back_to_prom(void)
{
noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000);

func();
}

void ATTRIB_NORET dec_machine_restart(char *command)
void __noreturn dec_machine_restart(char *command)
{
back_to_prom();
}

void ATTRIB_NORET dec_machine_halt(void)
void __noreturn dec_machine_halt(void)
{
back_to_prom();
}

void ATTRIB_NORET dec_machine_power_off(void)
void __noreturn dec_machine_power_off(void)
{
/* DECstations don't have a software power switch */
back_to_prom();
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* power and have a low exit latency (ie sit in a loop waiting for somebody to
* say that they'd like to reschedule)
*/
ATTRIB_NORET void cpu_idle(void)
void __noreturn cpu_idle(void)
{
/* endless idle loop with no priority at all */
while (1) {
Expand Down Expand Up @@ -213,7 +213,7 @@ int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr)
/*
* Create a kernel thread
*/
static ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *))
static void __noreturn kernel_thread_helper(void *arg, int (*fn)(void *))
{
do_exit(fn(arg));
}
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ EXPORT_SYMBOL(phys_cpu_present_map);
EXPORT_SYMBOL(cpu_online_map);

extern void __init calibrate_delay(void);
extern ATTRIB_NORET void cpu_idle(void);
extern void cpu_idle(void);

/*
* First C code run on the secondary CPUs after being started up by
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void show_registers(struct pt_regs *regs)

static DEFINE_SPINLOCK(die_lock);

NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs)
void __noreturn die(const char * str, struct pt_regs * regs)
{
static int die_counter;
#ifdef CONFIG_MIPS_MT_SMTC
Expand Down
6 changes: 3 additions & 3 deletions arch/mips/sgi-ip22/ip22-reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer;

static int machine_state;

static void ATTRIB_NORET sgi_machine_power_off(void)
static void __noreturn sgi_machine_power_off(void)
{
unsigned int tmp;

Expand All @@ -68,15 +68,15 @@ static void ATTRIB_NORET sgi_machine_power_off(void)
}
}

static void ATTRIB_NORET sgi_machine_restart(char *command)
static void __noreturn sgi_machine_restart(char *command)
{
if (machine_state & MACHINE_SHUTTING_DOWN)
sgi_machine_power_off();
sgimc->cpuctrl0 |= SGIMC_CCTRL0_SYSINIT;
while (1);
}

static void ATTRIB_NORET sgi_machine_halt(void)
static void __noreturn sgi_machine_halt(void)
{
if (machine_state & MACHINE_SHUTTING_DOWN)
sgi_machine_power_off();
Expand Down
6 changes: 3 additions & 3 deletions arch/mips/sibyte/cfe/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extern unsigned long initrd_start, initrd_end;
extern int kgdb_port;
#endif

static void ATTRIB_NORET cfe_linux_exit(void *arg)
static void __noreturn cfe_linux_exit(void *arg)
{
int warm = *(int *)arg;

Expand All @@ -83,14 +83,14 @@ static void ATTRIB_NORET cfe_linux_exit(void *arg)
while (1);
}

static void ATTRIB_NORET cfe_linux_restart(char *command)
static void __noreturn cfe_linux_restart(char *command)
{
static const int zero;

cfe_linux_exit((void *)&zero);
}

static void ATTRIB_NORET cfe_linux_halt(void)
static void __noreturn cfe_linux_halt(void)
{
static const int one = 1;

Expand Down

0 comments on commit b3f6df9

Please sign in to comment.