]> git.neil.brown.name Git - history.git/commitdiff
PPC32: Remove extra __KERNEL__ checks in some headers, as well
authorTom Rini <trini@kernel.crashing.org>
Tue, 7 Jan 2003 05:45:22 +0000 (22:45 -0700)
committerTom Rini <trini@kernel.crashing.org>
Tue, 7 Jan 2003 05:45:22 +0000 (22:45 -0700)
as adding /* __KERNEL__ */ to the #endif of others.

include/asm-ppc/bitops.h
include/asm-ppc/cache.h
include/asm-ppc/io.h
include/asm-ppc/nvram.h
include/asm-ppc/param.h
include/asm-ppc/signal.h
include/asm-ppc/socket.h
include/asm-ppc/termios.h

index e65a7f854dfea6c0a3d175f2637f608d2adeb49b..da32a543c856c51661fb048971692fbf786f0a37 100644 (file)
@@ -236,8 +236,6 @@ static __inline__ int ffz(unsigned long x)
        return __ilog2(x & -x);
 }
 
-#ifdef __KERNEL__
-
 static inline int __ffs(unsigned long x)
 {
        return __ilog2(x & -x);
@@ -274,8 +272,6 @@ static __inline__ int fls(unsigned int x)
 #define hweight16(x) generic_hweight16(x)
 #define hweight8(x) generic_hweight8(x)
 
-#endif /* __KERNEL__ */
-
 /*
  * Find the first bit set in a 140-bit bitmap.
  * The first 100 bits are unlikely to be set.
@@ -395,8 +391,6 @@ found_middle:
 }
 
 
-#ifdef __KERNEL__
-
 #define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr))
 #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr))
 
@@ -460,7 +454,5 @@ found_middle:
 #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
 #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
 
-#endif /* __KERNEL__ */
-
 #endif /* _PPC_BITOPS_H */
 #endif /* __KERNEL__ */
index 1f19b8ccffe9649f2ae1833ffa34d6f6d0af558a..bdb462100ba1c20289d2e1c1070b879d0907e6dd 100644 (file)
                 __section__(".data.cacheline_aligned")))
 #endif
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#ifndef __ASSEMBLY__
 extern void clean_dcache_range(unsigned long start, unsigned long stop);
 extern void flush_dcache_range(unsigned long start, unsigned long stop);
 extern void invalidate_dcache_range(unsigned long start, unsigned long stop);
 extern void flush_dcache_all(void);
-
 #endif /* __ASSEMBLY__ */
 
 /* prep registers for L2 */
index 09e041e964b123e83471f42524b8cd1619ab3f30..29eaaae63187d3503665cb77ee6e4301ba5ec7cf 100644 (file)
@@ -193,7 +193,6 @@ extern void _outsl_ns(volatile u32 *port, const void *buf, int nl);
 #define memcpy_fromio(a,b,c)   memcpy((a),(void *)(b),(c))
 #define memcpy_toio(a,b,c)     memcpy((void *)(a),(b),(c))
 
-#ifdef __KERNEL__
 /*
  * Map in an area of physical address space, for accessing
  * I/O devices etc.
@@ -265,8 +264,6 @@ extern inline void * phys_to_virt(unsigned long address)
 #define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
 #define page_to_bus(page)      (page_to_phys(page) + PCI_DRAM_OFFSET)
 
-#endif /* __KERNEL__ */
-
 /*
  * Enforce In-order Execution of I/O:
  * Acts as a barrier to ensure all previous I/O accesses have
index 47e4dfc74a779fd714dd537b13d45487b3ab02d8..d65bb55baf9de0c40b70a7d6b4e3cc4a85c401c4 100644 (file)
@@ -31,8 +31,6 @@ enum {
        pmac_nvram_NR           /* MacOS Name Registry partition */
 };
 
-#ifdef __KERNEL__
-
 /* Return partition offset in nvram */
 extern int     pmac_get_partition(int partition);
 
@@ -40,8 +38,6 @@ extern int    pmac_get_partition(int partition);
 extern u8      pmac_xpram_read(int xpaddr);
 extern void    pmac_xpram_write(int xpaddr, u8 data);
 
-#endif /* __KERNEL__ */
-
 /* Some offsets in XPRAM */
 #define PMAC_XPRAM_MACHINE_LOC 0xe4
 #define PMAC_XPRAM_SOUND_VOLUME        0x08
index a0c23264d9f95802e974aea8b152a0a5357aced8..428a10582ac67f23caaec1ae563dd4819c6e0ca2 100644 (file)
@@ -9,7 +9,7 @@
 #define HZ             100             /* internal timer frequency */
 #define USER_HZ                100             /* for user interfaces in "ticks" */
 #define CLOCKS_PER_SEC (USER_HZ)       /* frequency at which times() counts */
-#endif
+#endif /* __KERNEL__ */
 
 #define EXEC_PAGESIZE  4096
 
index 4958b3f3547ada75a0bba88fa3a67395f347d782..57c399154f43a51e53587567451a219feedf344e 100644 (file)
@@ -111,7 +111,7 @@ typedef struct {
 #define SA_PROBE               SA_ONESHOT
 #define SA_SAMPLE_RANDOM       SA_RESTART
 #define SA_SHIRQ               0x04000000
-#endif
+#endif /* __KERNEL__ */
 
 #define SIG_BLOCK          0   /* for blocking signals */
 #define SIG_UNBLOCK        1   /* for unblocking signals */
@@ -150,7 +150,6 @@ typedef struct sigaltstack {
 
 #ifdef __KERNEL__
 #include <asm/sigcontext.h>
-
-#endif
+#endif /* __KERNEL__ */
 
 #endif
index e020c82192dc597e859eda5ef3c92566eb8278b3..d513b3238efde92cd0ea89ea9a741081e937b48c 100644 (file)
@@ -65,6 +65,6 @@
                                        /* other similar things on the  */
                                        /* user level.                  */
 #define        SOCK_MAX        (SOCK_PACKET+1)
-#endif
+#endif /* __KERNEL__ */
 
 #endif /* _ASM_SOCKET_H */
index fe999e9cbca4fa6b19f1411be5f56243b2534564..e9c7434dafe5518c282577d17a29f0d8f0079b66 100644 (file)
@@ -153,7 +153,7 @@ struct termio {
 #ifdef __KERNEL__
 /*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
 #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 
-#endif
+#endif /* __KERNEL__ */
 
 /* modem lines */
 #define TIOCM_LE       0x001