Skip to contentSkip to conversation

sparc: use asm-generic version of types.h

PATCH Applied Sam Ravnborg 2 participants 2 messages Mar 31, 2013 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sparc: use asm-generic version of types.h

From: Sam Ravnborg <[email protected]>
Subject: [PATCH v2] sparc: use asm-generic version of types.h

In sparc headers we use the following pattern:

    #if defined(__sparc__) && defined(__arch64__)

    sparc64 specific stuff

    #else

    sparc32 specific stuff

    #endif

In types.h this pattern was not followed and here
we only checked for __sparc__ for no good reason.
It was a left-over from long time ago.

I checked other architectures - and most of them
do not have any such checks. And all the recently
merged versions uses the asm-generic version.

---

v2: Updated changelog.
- Dropped note that this fixes buid issue in samples/ as this is really un-related.
- Added description why we can use the generic version

Sam

 arch/sparc/include/asm/Kbuild       |    1 +
 arch/sparc/include/uapi/asm/Kbuild  |    1 -
 arch/sparc/include/uapi/asm/types.h |   17 -----------------
 3 files changed, 1 insertions(+), 18 deletions(-)
 delete mode 100644 arch/sparc/include/uapi/asm/types.h
arch/sparc/include/asm/Kbuild +1 -0
index f73884b..ff18e3c 100644
@@ -13,4 +13,5 @@ generic-y += local.h
 generic-y += module.h
 generic-y += serial.h
 generic-y += trace_clock.h
+generic-y += types.h
 generic-y += word-at-a-time.h
arch/sparc/include/uapi/asm/Kbuild +0 -1
index ce175af..b5843ee 100644
@@ -44,7 +44,6 @@ header-y += swab.h
 header-y += termbits.h
 header-y += termios.h
 header-y += traps.h
-header-y += types.h
 header-y += uctx.h
 header-y += unistd.h
 header-y += utrap.h
arch/sparc/include/uapi/asm/types.h deleted +0 -17
deleted file mode 100644
index 383d156..0000000
@@ -1,17 +0,0 @@
-#ifndef _SPARC_TYPES_H
-#define _SPARC_TYPES_H
-/*
- * This file is never included by application software unless
- * explicitly requested (e.g., via linux/types.h) in which case the
- * application is Linux specific so (user-) name space pollution is
- * not a major issue.  However, for interoperability, libraries still
- * need to be careful to avoid a name clashes.
- */
-
-#if defined(__sparc__)
-
-#include <asm-generic/int-ll64.h>
-
-#endif /* defined(__sparc__) */
-
-#endif /* defined(_SPARC_TYPES_H) */
Signature · 1 line
1.6.0.6
maintainer Applied
#1 lore raw

From: Sam Ravnborg <[email protected]>
Date: Sun, 31 Mar 2013 19:01:47 +0200

Quoted 19 lines

From: Sam Ravnborg <[email protected]>
Subject: [PATCH v2] sparc: use asm-generic version of types.h

In sparc headers we use the following pattern:

    #if defined(__sparc__) && defined(__arch64__)

    sparc64 specific stuff

    #else

    sparc32 specific stuff

    #endif

In types.h this pattern was not followed and here we only checked for __sparc__ for no good reason. It was a left-over from long time ago.

Quoted 5 lines

I checked other architectures - and most of them do not have any such checks. And all the recently merged versions uses the asm-generic version.

Applied.