mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@www.linux.org.uk>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] (37/43) qualifiers in return types - easy cases
Date: Tue, 23 Aug 2005 22:47:52 +0100	[thread overview]
Message-ID: <E1E7gca-0007Em-Da@parcelfarce.linux.theplanet.co.uk> (raw)

a bunch of functions switched from volatile to __attribute__((noreturn)) and
from const to __attribute_pure__

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
----
diff -urN RC13-rc6-git13-qdio_get_indicator/arch/arm/kernel/traps.c RC13-rc6-git13-attr/arch/arm/kernel/traps.c
--- RC13-rc6-git13-qdio_get_indicator/arch/arm/kernel/traps.c	2005-08-10 10:37:45.000000000 -0400
+++ RC13-rc6-git13-attr/arch/arm/kernel/traps.c	2005-08-21 13:17:19.000000000 -0400
@@ -617,7 +617,7 @@
 	notify_die("unknown data abort code", regs, &info, instr, 0);
 }
 
-volatile void __bug(const char *file, int line, void *data)
+void __attribute__((noreturn)) __bug(const char *file, int line, void *data)
 {
 	printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
 	if (data)
diff -urN RC13-rc6-git13-qdio_get_indicator/arch/arm/nwfpe/fpopcode.h RC13-rc6-git13-attr/arch/arm/nwfpe/fpopcode.h
--- RC13-rc6-git13-qdio_get_indicator/arch/arm/nwfpe/fpopcode.h	2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc6-git13-attr/arch/arm/nwfpe/fpopcode.h	2005-08-21 13:17:19.000000000 -0400
@@ -370,20 +370,20 @@
 #define getRoundingMode(opcode)		((opcode & MASK_ROUNDING_MODE) >> 5)
 
 #ifdef CONFIG_FPE_NWFPE_XP
-static inline const floatx80 getExtendedConstant(const unsigned int nIndex)
+static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex)
 {
 	extern const floatx80 floatx80Constant[];
 	return floatx80Constant[nIndex];
 }
 #endif
 
-static inline const float64 getDoubleConstant(const unsigned int nIndex)
+static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex)
 {
 	extern const float64 float64Constant[];
 	return float64Constant[nIndex];
 }
 
-static inline const float32 getSingleConstant(const unsigned int nIndex)
+static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex)
 {
 	extern const float32 float32Constant[];
 	return float32Constant[nIndex];
diff -urN RC13-rc6-git13-qdio_get_indicator/include/asm-arm/bug.h RC13-rc6-git13-attr/include/asm-arm/bug.h
--- RC13-rc6-git13-qdio_get_indicator/include/asm-arm/bug.h	2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc6-git13-attr/include/asm-arm/bug.h	2005-08-21 13:17:19.000000000 -0400
@@ -5,7 +5,7 @@
 
 #ifdef CONFIG_BUG
 #ifdef CONFIG_DEBUG_BUGVERBOSE
-extern volatile void __bug(const char *file, int line, void *data);
+extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
 
 /* give file/line information */
 #define BUG()		__bug(__FILE__, __LINE__, NULL)
diff -urN RC13-rc6-git13-qdio_get_indicator/include/asm-arm/cpu-multi32.h RC13-rc6-git13-attr/include/asm-arm/cpu-multi32.h
--- RC13-rc6-git13-qdio_get_indicator/include/asm-arm/cpu-multi32.h	2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc6-git13-attr/include/asm-arm/cpu-multi32.h	2005-08-21 13:17:19.000000000 -0400
@@ -31,7 +31,7 @@
 	/*
 	 * Special stuff for a reset
 	 */
-	volatile void (*reset)(unsigned long addr);
+	void (*reset)(unsigned long addr) __attribute__((noreturn));
 	/*
 	 * Idle the processor
 	 */
diff -urN RC13-rc6-git13-qdio_get_indicator/include/asm-arm/cpu-single.h RC13-rc6-git13-attr/include/asm-arm/cpu-single.h
--- RC13-rc6-git13-qdio_get_indicator/include/asm-arm/cpu-single.h	2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc6-git13-attr/include/asm-arm/cpu-single.h	2005-08-21 13:17:19.000000000 -0400
@@ -41,4 +41,4 @@
 extern void cpu_dcache_clean_area(void *, int);
 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
-extern volatile void cpu_reset(unsigned long addr);
+extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
diff -urN RC13-rc6-git13-qdio_get_indicator/include/asm-ppc/time.h RC13-rc6-git13-attr/include/asm-ppc/time.h
--- RC13-rc6-git13-qdio_get_indicator/include/asm-ppc/time.h	2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc6-git13-attr/include/asm-ppc/time.h	2005-08-21 13:17:19.000000000 -0400
@@ -58,7 +58,7 @@
 /* Accessor functions for the timebase (RTC on 601) registers. */
 /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
 #ifdef CONFIG_6xx
-extern __inline__ int const __USE_RTC(void) {
+extern __inline__ int __attribute_pure__ __USE_RTC(void) {
 	return (mfspr(SPRN_PVR)>>16) == 1;
 }
 #else

                 reply	other threads:[~2005-08-23 21:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1E7gca-0007Em-Da@parcelfarce.linux.theplanet.co.uk \
    --to=viro@www.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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®