* [PATCH] kvm tool: Remove the __stringify* defination from the util.h
@ 2011-04-15 19:43 Prasad Joshi
2011-04-16 9:26 ` Pekka Enberg
0 siblings, 1 reply; 5+ messages in thread
From: Prasad Joshi @ 2011-04-15 19:43 UTC (permalink / raw)
To: prasadjoshi124
Cc: mingo, kvm, penberg, asias.hejun, gorcunov, levinsasha928,
chaitanyakulkarni15
Include the Linux kernel header file linux/stringify.h file instead of
redefining the __stringify* macros
Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
---
tools/kvm/include/kvm/util.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/kvm/include/kvm/util.h b/tools/kvm/include/kvm/util.h
index ae033cc..c308f3f 100644
--- a/tools/kvm/include/kvm/util.h
+++ b/tools/kvm/include/kvm/util.h
@@ -1,3 +1,5 @@
+#include "../../../../include/linux/stringify.h"
+
#ifndef KVM__UTIL_H
#define KVM__UTIL_H
@@ -27,9 +29,6 @@
#endif
#endif
-#define __stringify_1(x) #x
-#define __stringify(x) __stringify_1(x)
-
extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
extern void die_perror(const char *s) NORETURN;
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tool: Remove the __stringify* defination from the util.h
2011-04-15 19:43 [PATCH] kvm tool: Remove the __stringify* defination from the util.h Prasad Joshi
@ 2011-04-16 9:26 ` Pekka Enberg
2011-04-16 9:45 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Pekka Enberg @ 2011-04-16 9:26 UTC (permalink / raw)
To: Prasad Joshi
Cc: mingo, kvm, asias.hejun, gorcunov, levinsasha928,
chaitanyakulkarni15
On Fri, Apr 15, 2011 at 10:43 PM, Prasad Joshi <prasadjoshi124@gmail.com> wrote:
> Include the Linux kernel header file linux/stringify.h file instead of
> redefining the __stringify* macros
>
> Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
> ---
> tools/kvm/include/kvm/util.h | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tools/kvm/include/kvm/util.h b/tools/kvm/include/kvm/util.h
> index ae033cc..c308f3f 100644
> --- a/tools/kvm/include/kvm/util.h
> +++ b/tools/kvm/include/kvm/util.h
> @@ -1,3 +1,5 @@
> +#include "../../../../include/linux/stringify.h"
#include <linux/stringify.h> should just work, no?
> +
> #ifndef KVM__UTIL_H
> #define KVM__UTIL_H
>
> @@ -27,9 +29,6 @@
> #endif
> #endif
>
> -#define __stringify_1(x) #x
> -#define __stringify(x) __stringify_1(x)
> -
> extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
> extern void die_perror(const char *s) NORETURN;
> extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tool: Remove the __stringify* defination from the util.h
2011-04-16 9:26 ` Pekka Enberg
@ 2011-04-16 9:45 ` Ingo Molnar
2011-04-16 9:47 ` Pekka Enberg
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2011-04-16 9:45 UTC (permalink / raw)
To: Pekka Enberg
Cc: Prasad Joshi, kvm, asias.hejun, gorcunov, levinsasha928,
chaitanyakulkarni15
* Pekka Enberg <penberg@kernel.org> wrote:
> On Fri, Apr 15, 2011 at 10:43 PM, Prasad Joshi <prasadjoshi124@gmail.com> wrote:
> > Include the Linux kernel header file linux/stringify.h file instead of
> > redefining the __stringify* macros
> >
> > Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
> > ---
> > tools/kvm/include/kvm/util.h | 5 ++---
> > 1 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/kvm/include/kvm/util.h b/tools/kvm/include/kvm/util.h
> > index ae033cc..c308f3f 100644
> > --- a/tools/kvm/include/kvm/util.h
> > +++ b/tools/kvm/include/kvm/util.h
> > @@ -1,3 +1,5 @@
> > +#include "../../../../include/linux/stringify.h"
>
> #include <linux/stringify.h> should just work, no?
Only if kernel headers are installed. Also, and perhaps more importantly, in
the context of perf it was more robust to use the same kernel repo's source
code that perf resides in - should there be any fixes needed it's a lot easier
to remedy things.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tool: Remove the __stringify* defination from the util.h
2011-04-16 9:45 ` Ingo Molnar
@ 2011-04-16 9:47 ` Pekka Enberg
2011-04-16 9:49 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Pekka Enberg @ 2011-04-16 9:47 UTC (permalink / raw)
To: Ingo Molnar
Cc: Prasad Joshi, kvm, asias.hejun, gorcunov, levinsasha928,
chaitanyakulkarni15
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1144 bytes --]
On Sat, 16 Apr 2011, Ingo Molnar wrote:
>
> * Pekka Enberg <penberg@kernel.org> wrote:
>
>> On Fri, Apr 15, 2011 at 10:43 PM, Prasad Joshi <prasadjoshi124@gmail.com> wrote:
>>> Include the Linux kernel header file linux/stringify.h file instead of
>>> redefining the __stringify* macros
>>>
>>> Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
>>> ---
>>> tools/kvm/include/kvm/util.h | 5 ++---
>>> 1 files changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/tools/kvm/include/kvm/util.h b/tools/kvm/include/kvm/util.h
>>> index ae033cc..c308f3f 100644
>>> --- a/tools/kvm/include/kvm/util.h
>>> +++ b/tools/kvm/include/kvm/util.h
>>> @@ -1,3 +1,5 @@
>>> +#include "../../../../include/linux/stringify.h"
>>
>> #include <linux/stringify.h> should just work, no?
>
> Only if kernel headers are installed. Also, and perhaps more importantly, in
> the context of perf it was more robust to use the same kernel repo's source
> code that perf resides in - should there be any fixes needed it's a lot easier
> to remedy things.
We do this in the Makefile:
-I../../include -I../../arch/$(ARCH)/include/
so it should just work.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tool: Remove the __stringify* defination from the util.h
2011-04-16 9:47 ` Pekka Enberg
@ 2011-04-16 9:49 ` Ingo Molnar
0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2011-04-16 9:49 UTC (permalink / raw)
To: Pekka Enberg
Cc: Prasad Joshi, kvm, asias.hejun, gorcunov, levinsasha928,
chaitanyakulkarni15
* Pekka Enberg <penberg@kernel.org> wrote:
> On Sat, 16 Apr 2011, Ingo Molnar wrote:
>
> >
> >* Pekka Enberg <penberg@kernel.org> wrote:
> >
> >>On Fri, Apr 15, 2011 at 10:43 PM, Prasad Joshi <prasadjoshi124@gmail.com> wrote:
> >>>Include the Linux kernel header file linux/stringify.h file instead of
> >>>redefining the __stringify* macros
> >>>
> >>>Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
> >>>---
> >>> tools/kvm/include/kvm/util.h | 5 ++---
> >>> 1 files changed, 2 insertions(+), 3 deletions(-)
> >>>
> >>>diff --git a/tools/kvm/include/kvm/util.h b/tools/kvm/include/kvm/util.h
> >>>index ae033cc..c308f3f 100644
> >>>--- a/tools/kvm/include/kvm/util.h
> >>>+++ b/tools/kvm/include/kvm/util.h
> >>>@@ -1,3 +1,5 @@
> >>>+#include "../../../../include/linux/stringify.h"
> >>
> >>#include <linux/stringify.h> should just work, no?
> >
> >Only if kernel headers are installed. Also, and perhaps more importantly, in
> >the context of perf it was more robust to use the same kernel repo's source
> >code that perf resides in - should there be any fixes needed it's a lot easier
> >to remedy things.
>
> We do this in the Makefile:
>
> -I../../include -I../../arch/$(ARCH)/include/
>
> so it should just work.
Oh, nice! :-)
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-16 9:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15 19:43 [PATCH] kvm tool: Remove the __stringify* defination from the util.h Prasad Joshi
2011-04-16 9:26 ` Pekka Enberg
2011-04-16 9:45 ` Ingo Molnar
2011-04-16 9:47 ` Pekka Enberg
2011-04-16 9:49 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox