[PATCH] kexec-tools, ppc64: fix build error on ppc64

STALE5965d

7 messages, 4 authors, 2010-05-05 · open the first message on its own page

[PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Michael Neuling <hidden>
Date: 2010-05-05 01:48:53

6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.

Signed-off-by: Michael Neuling <redacted>
---
I've posted a second patch to fix the issue of changing one archs
Makefile, effecting all other archs.

 kexec/arch/ppc64/fs2dt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: kexec-tools/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools/kexec/arch/ppc64/fs2dt.c
@@ -357,7 +357,8 @@ static void putprops(char *fn, struct di
  * Compare function used to sort the device-tree directories
  * This function will be passed to scandir.
  */
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+		       const struct dirent **dentry2)
 {
 	char *str1 = (*(struct dirent **)dentry1)->d_name;
 	char *str2 = (*(struct dirent **)dentry2)->d_name;

Re: [PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Dale Farnsworth <hidden>
Date: 2010-05-05 02:25:46

In article [off-list ref] Michael Neuling wrote:
quoted hunk
6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.

Signed-off-by: Michael Neuling <redacted>
---
I've posted a second patch to fix the issue of changing one archs
Makefile, effecting all other archs.

 kexec/arch/ppc64/fs2dt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: kexec-tools/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools/kexec/arch/ppc64/fs2dt.c
@@ -357,7 +357,8 @@ static void putprops(char *fn, struct di
  * Compare function used to sort the device-tree directories
  * This function will be passed to scandir.
  */
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+		       const struct dirent **dentry2)
 {
 	char *str1 = (*(struct dirent **)dentry1)->d_name;
 	char *str2 = (*(struct dirent **)dentry2)->d_name;
It would be nice to also remove the no-longer-needed casts.

-Dale

Re: [PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Simon Horman <horms@verge.net.au>
Date: 2010-05-05 03:00:56

On Wed, May 05, 2010 at 11:48:53AM +1000, Michael Neuling wrote:
6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.
Thanks.

While I'm very much in favour of using -Werror for testing
and these kind of patches are great, I think that -Werror
by default is rather silly. We can't control what will be
a warning in the future and sometimes fixing warnings isn't
appropriate - for instance there are warnings in fs2dt.c at
the moment, that is currently considered an upstream problem.

In short, this patch is great. But I plan to also remove -Werror
as the default now that its been brought to my attention.
quoted hunk
Signed-off-by: Michael Neuling <redacted>
---
I've posted a second patch to fix the issue of changing one archs
Makefile, effecting all other archs.

 kexec/arch/ppc64/fs2dt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: kexec-tools/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools/kexec/arch/ppc64/fs2dt.c
@@ -357,7 +357,8 @@ static void putprops(char *fn, struct di
  * Compare function used to sort the device-tree directories
  * This function will be passed to scandir.
  */
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+		       const struct dirent **dentry2)
 {
 	char *str1 = (*(struct dirent **)dentry1)->d_name;
 	char *str2 = (*(struct dirent **)dentry2)->d_name;
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Michael Neuling <hidden>
Date: 2010-05-05 03:35:21


In message [off-list ref] you wrote:
On Wed, May 05, 2010 at 11:48:53AM +1000, Michael Neuling wrote:
quoted
6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.
Thanks.

While I'm very much in favour of using -Werror for testing
and these kind of patches are great, I think that -Werror
by default is rather silly. We can't control what will be
a warning in the future and sometimes fixing warnings isn't
appropriate - for instance there are warnings in fs2dt.c at
the moment, that is currently considered an upstream problem.

In short, this patch is great. But I plan to also remove -Werror
as the default now that its been brought to my attention.
Cool.  My second patch should do this for all but MIPS.

Mikey
quoted
Signed-off-by: Michael Neuling <redacted>
---
I've posted a second patch to fix the issue of changing one archs
Makefile, effecting all other archs.

 kexec/arch/ppc64/fs2dt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: kexec-tools/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools/kexec/arch/ppc64/fs2dt.c
@@ -357,7 +357,8 @@ static void putprops(char *fn, struct di
  * Compare function used to sort the device-tree directories
  * This function will be passed to scandir.
  */
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+		       const struct dirent **dentry2)
 {
 	char *str1 = (*(struct dirent **)dentry1)->d_name;
 	char *str2 = (*(struct dirent **)dentry2)->d_name;
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Simon Horman <horms@verge.net.au>
Date: 2010-05-05 03:39:33

On Wed, May 05, 2010 at 01:35:21PM +1000, Michael Neuling wrote:

In message [off-list ref] you wrote:
quoted
On Wed, May 05, 2010 at 11:48:53AM +1000, Michael Neuling wrote:
quoted
6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.
Thanks.

While I'm very much in favour of using -Werror for testing
and these kind of patches are great, I think that -Werror
by default is rather silly. We can't control what will be
a warning in the future and sometimes fixing warnings isn't
appropriate - for instance there are warnings in fs2dt.c at
the moment, that is currently considered an upstream problem.

In short, this patch is great. But I plan to also remove -Werror
as the default now that its been brought to my attention.
Cool.  My second patch should do this for all but MIPS.
Unfortunately the second patch breaks make tarball.
For now I have committed the following:
From 76beff0507360f3001e23c9b4c765ef56384d5d5 Mon Sep 17 00:00:00 2001
From: Simon Horman <horms@verge.net.au>
Date: Wed, 5 May 2010 13:33:21 +1000
Subject: [PATCH] build: Don't modify CFLAGS in kexec/arch/mips/Makefile

Revert this portion of recent MIPS changes as it actually effects the
CFLAGS for all architectures.  Moreover I'm somewhat dubious about
defaulting to -Werror for any architecture.

Signed-off-by: Simon Horman <horms@verge.net.au>
---
 kexec/arch/mips/Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/mips/Makefile b/kexec/arch/mips/Makefile
index 831b263..03bdb9a 100644
--- a/kexec/arch/mips/Makefile
+++ b/kexec/arch/mips/Makefile
@@ -14,5 +14,3 @@ dist += kexec/arch/mips/Makefile $(mips_KEXEC_SRCS)			\
 	kexec/arch/mips/kexec-mips.h					\
 	kexec/arch/mips/crashdump-mips.h				\
 	kexec/arch/mips/include/arch/options.h
-
-CFLAGS +=-Wall -Werror
-- 
1.7.1

Re: [PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Maxim Uvarov <hidden>
Date: 2010-05-05 07:46:28

2010/5/5 Simon Horman [off-list ref]
quoted hunk
On Wed, May 05, 2010 at 01:35:21PM +1000, Michael Neuling wrote:
quoted

In message [off-list ref] you wrote:
quoted
On Wed, May 05, 2010 at 11:48:53AM +1000, Michael Neuling wrote:
quoted
6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.
Thanks.

While I'm very much in favour of using -Werror for testing
and these kind of patches are great, I think that -Werror
by default is rather silly. We can't control what will be
a warning in the future and sometimes fixing warnings isn't
appropriate - for instance there are warnings in fs2dt.c at
the moment, that is currently considered an upstream problem.

In short, this patch is great. But I plan to also remove -Werror
as the default now that its been brought to my attention.
Cool.  My second patch should do this for all but MIPS.
Unfortunately the second patch breaks make tarball.
For now I have committed the following:

From 76beff0507360f3001e23c9b4c765ef56384d5d5 Mon Sep 17 00:00:00 2001
From: Simon Horman <horms@verge.net.au>
Date: Wed, 5 May 2010 13:33:21 +1000
Subject: [PATCH] build: Don't modify CFLAGS in kexec/arch/mips/Makefile

Revert this portion of recent MIPS changes as it actually effects the
CFLAGS for all architectures.  Moreover I'm somewhat dubious about
defaulting to -Werror for any architecture.

Signed-off-by: Simon Horman <horms@verge.net.au>
---
 kexec/arch/mips/Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/mips/Makefile b/kexec/arch/mips/Makefile
index 831b263..03bdb9a 100644
--- a/kexec/arch/mips/Makefile
+++ b/kexec/arch/mips/Makefile
@@ -14,5 +14,3 @@ dist += kexec/arch/mips/Makefile $(mips_KEXEC_SRCS)
            \
       kexec/arch/mips/kexec-mips.h                                    \
       kexec/arch/mips/crashdump-mips.h                                \
       kexec/arch/mips/include/arch/options.h
-
-CFLAGS +=-Wall -Werror
--
1.7.1
Plan was to have -Werror only for mips. Thanks for fixes.

-- 
Best regards,
Maxim Uvarov

Re: [PATCH] kexec-tools, ppc64: fix build error on ppc64

From: Simon Horman <horms@verge.net.au>
Date: 2010-05-05 08:29:35

On Wed, May 05, 2010 at 11:46:25AM +0400, Maxim Uvarov wrote:
2010/5/5 Simon Horman [off-list ref]
quoted
On Wed, May 05, 2010 at 01:35:21PM +1000, Michael Neuling wrote:
quoted

In message [off-list ref] you wrote:
quoted
On Wed, May 05, 2010 at 11:48:53AM +1000, Michael Neuling wrote:
quoted
6adc05c6e3fdbc8b9f5d915af78ca05d0a09cb17 "some kexec MIPS
improvements" broke pp64 as it turned on -Werror for all archs.

This fixes the warning and hence ppc64 building.
Thanks.

While I'm very much in favour of using -Werror for testing
and these kind of patches are great, I think that -Werror
by default is rather silly. We can't control what will be
a warning in the future and sometimes fixing warnings isn't
appropriate - for instance there are warnings in fs2dt.c at
the moment, that is currently considered an upstream problem.

In short, this patch is great. But I plan to also remove -Werror
as the default now that its been brought to my attention.
Cool.  My second patch should do this for all but MIPS.
Unfortunately the second patch breaks make tarball.
For now I have committed the following:

From 76beff0507360f3001e23c9b4c765ef56384d5d5 Mon Sep 17 00:00:00 2001
From: Simon Horman <horms@verge.net.au>
Date: Wed, 5 May 2010 13:33:21 +1000
Subject: [PATCH] build: Don't modify CFLAGS in kexec/arch/mips/Makefile

Revert this portion of recent MIPS changes as it actually effects the
CFLAGS for all architectures.  Moreover I'm somewhat dubious about
defaulting to -Werror for any architecture.

Signed-off-by: Simon Horman <horms@verge.net.au>
---
 kexec/arch/mips/Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/mips/Makefile b/kexec/arch/mips/Makefile
index 831b263..03bdb9a 100644
--- a/kexec/arch/mips/Makefile
+++ b/kexec/arch/mips/Makefile
@@ -14,5 +14,3 @@ dist += kexec/arch/mips/Makefile $(mips_KEXEC_SRCS)
            \
       kexec/arch/mips/kexec-mips.h                                    \
       kexec/arch/mips/crashdump-mips.h                                \
       kexec/arch/mips/include/arch/options.h
-
-CFLAGS +=-Wall -Werror
--
1.7.1
Plan was to have -Werror only for mips. Thanks for fixes.
No problem, I should have noticed this earlier.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help