All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] fix 2.4-kernel build warning
Date: Thu, 30 Aug 2007 08:27:06 +0200	[thread overview]
Message-ID: <46D6633A.5010906@domain.hid> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1253 bytes --]

I noticed some warning during a 2.4 build of trunk which may point out
unexpected side effects:

In file included from pod.c:45:
/usr/src/linux-2.4.35.1/include/asm/xenomai/bits/pod.h:32:1: warning: "xnarch_tsc_to_ns" redefined
In file included from /usr/src/linux-2.4.35.1/include/linux/modversions.h:275,
                 from /usr/src/linux-2.4.35.1/include/linux/module.h:22,
                 from /usr/src/linux-2.4.35.1/include/asm-generic/xenomai/system.h:30,
                 from /usr/src/linux-2.4.35.1/include/asm/xenomai/system.h:28,
                 from /usr/src/linux-2.4.35.1/include/xenomai/nucleus/types.h:39,
                 from /usr/src/linux-2.4.35.1/include/xenomai/nucleus/queue.h:24,
                 from /usr/src/linux-2.4.35.1/include/xenomai/nucleus/timebase.h:29,
                 from /usr/src/linux-2.4.35.1/include/xenomai/nucleus/timer.h:26,
                 from /usr/src/linux-2.4.35.1/include/xenomai/nucleus/thread.h:25,
                 from /usr/src/linux-2.4.35.1/include/xenomai/nucleus/pod.h:34,
                 from pod.c:36:
/usr/src/linux-2.4.35.1/include/linux/modules/pod.ver:4:1: warning: this is the location of the previous definition

However, the attached patch fixes it.

Jan

[-- Attachment #1.2: fix-2.4-redefine-warning.patch --]
[-- Type: text/plain, Size: 3136 bytes --]

---
 include/asm-arm/bits/pod.h      |    2 +-
 include/asm-blackfin/bits/pod.h |    2 +-
 include/asm-generic/bits/pod.h  |   10 ++++------
 include/asm-i386/bits/pod.h     |    2 +-
 include/asm-x86_64/bits/pod.h   |    2 +-
 5 files changed, 8 insertions(+), 10 deletions(-)

Index: xenomai/include/asm-arm/bits/pod.h
===================================================================
--- xenomai.orig/include/asm-arm/bits/pod.h
+++ xenomai/include/asm-arm/bits/pod.h
@@ -30,7 +30,7 @@ long long xnarch_tsc_to_ns(long long ts)
 {
 	return xnarch_llmulshft(ts, xnarch_tsc_scale, xnarch_tsc_shift);
 }
-#define xnarch_tsc_to_ns	xnarch_tsc_to_ns
+#define XNARCH_TSC_TO_NS
 
 #include <asm-generic/xenomai/bits/pod.h>
 
Index: xenomai/include/asm-blackfin/bits/pod.h
===================================================================
--- xenomai.orig/include/asm-blackfin/bits/pod.h
+++ xenomai/include/asm-blackfin/bits/pod.h
@@ -27,7 +27,7 @@ long long xnarch_tsc_to_ns(long long ts)
 {
 	return xnarch_llmulshft(ts, xnarch_tsc_scale, xnarch_tsc_shift);
 }
-#define xnarch_tsc_to_ns	xnarch_tsc_to_ns
+#define XNARCH_TSC_TO_NS
 
 #include <asm-generic/xenomai/bits/pod.h>
 
Index: xenomai/include/asm-generic/bits/pod.h
===================================================================
--- xenomai.orig/include/asm-generic/bits/pod.h
+++ xenomai/include/asm-generic/bits/pod.h
@@ -273,23 +273,21 @@ unsigned long long xnarch_get_host_time(
 
 EXPORT_SYMBOL(xnarch_get_host_time);
 
-#ifndef xnarch_tsc_to_ns
+#ifndef XNARCH_TSC_TO_NS
 long long xnarch_tsc_to_ns(long long ts)
 {
     return xnarch_llimd(ts,1000000000,RTHAL_CPU_FREQ);
 }
-#define xnarch_tsc_to_ns	xnarch_tsc_to_ns
-#endif /* !xnarch_tsc_to_ns */
+#endif /* !XNARCH_TSC_TO_NS */
 
 EXPORT_SYMBOL(xnarch_tsc_to_ns);
 
-#ifndef xnarch_ns_to_tsc
+#ifndef XNARCH_NS_TO_TSC
 long long xnarch_ns_to_tsc(long long ns)
 {
     return xnarch_llimd(ns,RTHAL_CPU_FREQ,1000000000);
 }
-#define xnarch_ns_to_tsc	xnarch_ns_to_tsc
-#endif /* !xnarch_ns_to_tsc */
+#endif /* !XNARCH_NS_TO_TSC */
 
 EXPORT_SYMBOL(xnarch_ns_to_tsc);
 
Index: xenomai/include/asm-i386/bits/pod.h
===================================================================
--- xenomai.orig/include/asm-i386/bits/pod.h
+++ xenomai/include/asm-i386/bits/pod.h
@@ -29,7 +29,7 @@ long long xnarch_tsc_to_ns(long long ts)
 {
 	return xnarch_llmulshft(ts, xnarch_tsc_scale, xnarch_tsc_shift);
 }
-#define xnarch_tsc_to_ns	xnarch_tsc_to_ns
+#define XNARCH_TSC_TO_NS
 
 #include <asm-generic/xenomai/bits/pod.h>
 #include <asm/xenomai/switch.h>
Index: xenomai/include/asm-x86_64/bits/pod.h
===================================================================
--- xenomai.orig/include/asm-x86_64/bits/pod.h
+++ xenomai/include/asm-x86_64/bits/pod.h
@@ -28,7 +28,7 @@ long long xnarch_tsc_to_ns(long long ts)
 {
 	return xnarch_llmulshft(ts, xnarch_tsc_scale, xnarch_tsc_shift);
 }
-#define xnarch_tsc_to_ns	xnarch_tsc_to_ns
+#define XNARCH_TSC_TO_NS
 
 #include <asm-generic/xenomai/bits/pod.h>
 #include <asm/xenomai/switch.h>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

             reply	other threads:[~2007-08-30  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30  6:27 Jan Kiszka [this message]
2007-09-07  7:17 ` [Xenomai-core] [PATCH] fix 2.4-kernel build warning Philippe Gerum

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=46D6633A.5010906@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.