All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][TOOLS] xenperf: cleanup
@ 2008-07-15 13:36 Christoph Egger
  2008-07-15 13:39 ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Egger @ 2008-07-15 13:36 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]


Hi,

Attached patch makes xenperf's functions static which have no prototypes.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: tools_xenperf.diff --]
[-- Type: text/x-diff, Size: 571 bytes --]

diff -r bd6d194199e5 tools/misc/xenperf.c
--- a/tools/misc/xenperf.c	Tue Jul 15 14:04:02 2008 +0100
+++ b/tools/misc/xenperf.c	Tue Jul 15 15:22:00 2008 +0200
@@ -68,7 +68,7 @@ const char *hypercall_name_table[64] =
 };
 #undef X
 
-int lock_pages(void *addr, size_t len)
+static int lock_pages(void *addr, size_t len)
 {
     int e = 0;
 #ifndef __sun__
@@ -77,7 +77,7 @@ int lock_pages(void *addr, size_t len)
     return (e);
 }
 
-void unlock_pages(void *addr, size_t len)
+static void unlock_pages(void *addr, size_t len)
 {
 #ifndef __sun__
     munlock(addr, len);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][TOOLS] xenperf: cleanup
  2008-07-15 13:36 [PATCH][TOOLS] xenperf: cleanup Christoph Egger
@ 2008-07-15 13:39 ` Keir Fraser
  2008-07-15 13:45   ` Christoph Egger
  0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-15 13:39 UTC (permalink / raw)
  To: Christoph Egger, xen-devel

How many more of these are there going to be?

 -- Keir

On 15/7/08 14:36, "Christoph Egger" <Christoph.Egger@amd.com> wrote:

> 
> Hi,
> 
> Attached patch makes xenperf's functions static which have no prototypes.
> 
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][TOOLS] xenperf: cleanup
  2008-07-15 13:39 ` Keir Fraser
@ 2008-07-15 13:45   ` Christoph Egger
  2008-07-15 13:52     ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Egger @ 2008-07-15 13:45 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

On Tuesday 15 July 2008 15:39:42 Keir Fraser wrote:
> How many more of these are there going to be?

One more (already sent). Then the tools build with the additional compiler 
flags:

-Wstrict-prototypes -Wswitch -Wmissing-prototypes -Wreturn-type -Wnested-externs
-Wredundant-decls -Wfloat-equal -Wundef -Wimplicit-function-declaration

Is there a way to add them  w/o adding them to the xen-kernel ?

Christoph

>
>  -- Keir
>
> On 15/7/08 14:36, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> > Hi,
> >
> > Attached patch makes xenperf's functions static which have no prototypes.
> >
> > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>



-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][TOOLS] xenperf: cleanup
  2008-07-15 13:45   ` Christoph Egger
@ 2008-07-15 13:52     ` Keir Fraser
  2008-07-15 14:06       ` Christoph Egger
  0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-15 13:52 UTC (permalink / raw)
  To: Christoph Egger, xen-devel

On 15/7/08 14:45, "Christoph Egger" <Christoph.Egger@amd.com> wrote:

> One more (already sent). Then the tools build with the additional compiler
> flags:
> 
> -Wstrict-prototypes -Wswitch -Wmissing-prototypes -Wreturn-type
> -Wnested-externs
> -Wredundant-decls -Wfloat-equal -Wundef -Wimplicit-function-declaration

Do we really want these? Certainly I'm not going to play whack-a-warning
with umpteen versions of gcc before 3.3 is out.

 -- Keir

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][TOOLS] xenperf: cleanup
  2008-07-15 13:52     ` Keir Fraser
@ 2008-07-15 14:06       ` Christoph Egger
  2008-07-15 14:16         ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Egger @ 2008-07-15 14:06 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Tuesday 15 July 2008 15:52:13 Keir Fraser wrote:
> On 15/7/08 14:45, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> > One more (already sent). Then the tools build with the additional
> > compiler flags:
> >
> > -Wstrict-prototypes -Wswitch -Wmissing-prototypes -Wreturn-type
> > -Wnested-externs
> > -Wredundant-decls -Wfloat-equal -Wundef -Wimplicit-function-declaration
>
> Do we really want these? Certainly I'm not going to play whack-a-warning
> with umpteen versions of gcc before 3.3 is out.

Probably not all of them. -Wfloat-equal has no effect because there's no FPU 
code in Xen.

The flags  -Wmissing-prototypes -Wnested-externs -Wredundant-decls
and -Wimplicit-function-declaration    resulted in the patches I sent 
yesterday and today.
These flags guarantee that future patches have a higher quality.

For the xen-kernel itself I'm not yet through with these flags.
Nonetheless, I can send a patch you will like. :)

Christoph

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][TOOLS] xenperf: cleanup
  2008-07-15 14:06       ` Christoph Egger
@ 2008-07-15 14:16         ` Keir Fraser
  2008-07-15 14:41           ` [PATCH][XEN] cleanup (was: Re: [PATCH][TOOLS] xenperf: cleanup) Christoph Egger
  0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-15 14:16 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel




On 15/7/08 15:06, "Christoph Egger" <Christoph.Egger@amd.com> wrote:

> For the xen-kernel itself I'm not yet through with these flags.
> Nonetheless, I can send a patch you will like. :)

I doubt it. :-)

 -- keir

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH][XEN] cleanup (was: Re: [PATCH][TOOLS] xenperf: cleanup)
  2008-07-15 14:16         ` Keir Fraser
@ 2008-07-15 14:41           ` Christoph Egger
  2008-07-15 14:44             ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Egger @ 2008-07-15 14:41 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

On Tuesday 15 July 2008 16:16:27 Keir Fraser wrote:
> On 15/7/08 15:06, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> > For the xen-kernel itself I'm not yet through with these flags.
> > Nonetheless, I can send a patch you will like. :)
>
> I doubt it. :-)
>
>  -- keir

Then check this out! :-)

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

Christoph


-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: xen_cleanup.diff --]
[-- Type: text/x-diff, Size: 2281 bytes --]

diff -r 4b882c41c9b9 xen/common/sched_sedf.c
--- a/xen/common/sched_sedf.c	Tue Jul 15 15:03:58 2008 +0100
+++ b/xen/common/sched_sedf.c	Tue Jul 15 16:32:42 2008 +0200
@@ -288,7 +288,7 @@ static inline void list_insert_sort(
 }
 
 #define DOMAIN_COMPARER(name, field, comp1, comp2)          \
-int name##_comp(struct list_head* el1, struct list_head* el2) \
+static int name##_comp(struct list_head* el1, struct list_head* el2) \
 {                                                           \
     struct sedf_vcpu_info *d1, *d2;                     \
     d1 = list_entry(el1,struct sedf_vcpu_info, field);  \
@@ -1067,7 +1067,7 @@ static inline int should_switch(struct v
     return 1;
 }
 
-void sedf_wake(struct vcpu *d)
+static void sedf_wake(struct vcpu *d)
 {
     s_time_t              now = NOW();
     struct sedf_vcpu_info* inf = EDOM_INFO(d);
diff -r 4b882c41c9b9 xen/common/stop_machine.c
--- a/xen/common/stop_machine.c	Tue Jul 15 15:03:58 2008 +0100
+++ b/xen/common/stop_machine.c	Tue Jul 15 16:32:42 2008 +0200
@@ -25,6 +25,7 @@
 #include <xen/sched.h>
 #include <xen/spinlock.h>
 #include <xen/softirq.h>
+#include <xen/stop_machine.h>
 #include <xen/errno.h>
 #include <xen/smp.h>
 #include <asm/current.h>
diff -r 4b882c41c9b9 xen/common/version.c
--- a/xen/common/version.c	Tue Jul 15 15:03:58 2008 +0100
+++ b/xen/common/version.c	Tue Jul 15 16:32:42 2008 +0200
@@ -1,4 +1,5 @@
 #include <xen/compile.h>
+#include <xen/version.h>
 
 const char *xen_compile_date(void)
 {
diff -r 4b882c41c9b9 xen/drivers/acpi/reboot.c
--- a/xen/drivers/acpi/reboot.c	Tue Jul 15 15:03:58 2008 +0100
+++ b/xen/drivers/acpi/reboot.c	Tue Jul 15 16:32:42 2008 +0200
@@ -1,5 +1,6 @@
 #include <xen/config.h>
 #include <xen/pci.h>
+#include <xen/acpi.h>
 #include <acpi/acpi.h>
 
 void acpi_reboot(void)
diff -r 4b882c41c9b9 xen/drivers/passthrough/amd/iommu_intr.c
--- a/xen/drivers/passthrough/amd/iommu_intr.c	Tue Jul 15 15:03:58 2008 +0100
+++ b/xen/drivers/passthrough/amd/iommu_intr.c	Tue Jul 15 16:32:42 2008 +0200
@@ -25,7 +25,7 @@ DEFINE_SPINLOCK(int_remap_table_lock);
 DEFINE_SPINLOCK(int_remap_table_lock);
 void *int_remap_table = NULL;
 
-u8* get_intremap_entry(u8 vector, u8 dm)
+static u8* get_intremap_entry(u8 vector, u8 dm)
 {
     u8 *table;
     int offset = 0;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][XEN] cleanup (was: Re: [PATCH][TOOLS] xenperf: cleanup)
  2008-07-15 14:41           ` [PATCH][XEN] cleanup (was: Re: [PATCH][TOOLS] xenperf: cleanup) Christoph Egger
@ 2008-07-15 14:44             ` Keir Fraser
  2008-07-15 15:05               ` Christoph Egger
  0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-15 14:44 UTC (permalink / raw)
  To: Christoph Egger, xen-devel

On 15/7/08 15:41, "Christoph Egger" <Christoph.Egger@amd.com> wrote:

>> On 15/7/08 15:06, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
>>> For the xen-kernel itself I'm not yet through with these flags.
>>> Nonetheless, I can send a patch you will like. :)
>> 
>> I doubt it. :-)
>> 
>>  -- keir
> 
> Then check this out! :-)
> 
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

Is that really the whole thing, and not 1 of N? It's very pleasantly
surprising if so!

 -- Keir

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH][XEN] cleanup (was: Re: [PATCH][TOOLS] xenperf: cleanup)
  2008-07-15 14:44             ` Keir Fraser
@ 2008-07-15 15:05               ` Christoph Egger
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Egger @ 2008-07-15 15:05 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Tuesday 15 July 2008 16:44:40 Keir Fraser wrote:
> On 15/7/08 15:41, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> >> On 15/7/08 15:06, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> >>> For the xen-kernel itself I'm not yet through with these flags.
> >>> Nonetheless, I can send a patch you will like. :)
> >>
> >> I doubt it. :-)
> >>
> >>  -- keir
> >
> > Then check this out! :-)
> >
> > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
>
> Is that really the whole thing, and not 1 of N? It's very pleasantly
> surprising if so!
>
>  -- Keir

No, that's just the part you like :)  All hypercall functions need
a prototype, for example, and there are a lot of redundant declarations.

Christoph

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-07-15 15:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 13:36 [PATCH][TOOLS] xenperf: cleanup Christoph Egger
2008-07-15 13:39 ` Keir Fraser
2008-07-15 13:45   ` Christoph Egger
2008-07-15 13:52     ` Keir Fraser
2008-07-15 14:06       ` Christoph Egger
2008-07-15 14:16         ` Keir Fraser
2008-07-15 14:41           ` [PATCH][XEN] cleanup (was: Re: [PATCH][TOOLS] xenperf: cleanup) Christoph Egger
2008-07-15 14:44             ` Keir Fraser
2008-07-15 15:05               ` Christoph Egger

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.