* [PATCH 0/2] Remove unneeded stddef.h includes
@ 2017-02-05 7:07 Stafford Horne
2017-02-05 7:07 ` [PATCH 1/2] libceph: Remove unneeded stddef.h include Stafford Horne
2017-02-05 7:07 ` [PATCH 2/2] staging: vchip_shim: " Stafford Horne
0 siblings, 2 replies; 6+ messages in thread
From: Stafford Horne @ 2017-02-05 7:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Stafford Horne
Hi All,
These were causing openrisc build to fail when building with allyesconfig
using a musl toolchain. Removing them doesnt seem to cause any issues.
The line removed was:
#include <stddef.h>
Perhaps what was wanted was 'linux/stddef.h' but there did seem to be any
special uses so I just removed it. Also, sending these patches should help
the kbuild robots verify that.
If I can get acks I will push it in with my openrisc branch. But if this
should got through the net and staging paths I am happy with that.
-Stafford
Stafford Horne (2):
libceph: Remove unneeded stddef.h include
staging: vchip_shim: Remove unneeded stddef.h include
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 --
net/ceph/snapshot.c | 2 --
2 files changed, 4 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] libceph: Remove unneeded stddef.h include
2017-02-05 7:07 [PATCH 0/2] Remove unneeded stddef.h includes Stafford Horne
@ 2017-02-05 7:07 ` Stafford Horne
2017-02-06 10:19 ` Ilya Dryomov
2017-02-06 16:16 ` David Laight
2017-02-05 7:07 ` [PATCH 2/2] staging: vchip_shim: " Stafford Horne
1 sibling, 2 replies; 6+ messages in thread
From: Stafford Horne @ 2017-02-05 7:07 UTC (permalink / raw)
To: linux-kernel
Cc: Stafford Horne, Ilya Dryomov, Yan, Zheng, Sage Weil,
David S. Miller, ceph-devel, netdev
This was causing a build failure for openrisc when using musl and
gcc 5.4.0 since the file is not available in the toolchain.
It doesnt seem this is needed and removing it does not cause any build
warnings for me.
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
net/ceph/snapshot.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ceph/snapshot.c b/net/ceph/snapshot.c
index 154683f..705414e 100644
--- a/net/ceph/snapshot.c
+++ b/net/ceph/snapshot.c
@@ -18,8 +18,6 @@
* 02110-1301, USA.
*/
-#include <stddef.h>
-
#include <linux/types.h>
#include <linux/export.h>
#include <linux/ceph/libceph.h>
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] staging: vchip_shim: Remove unneeded stddef.h include
2017-02-05 7:07 [PATCH 0/2] Remove unneeded stddef.h includes Stafford Horne
2017-02-05 7:07 ` [PATCH 1/2] libceph: Remove unneeded stddef.h include Stafford Horne
@ 2017-02-05 7:07 ` Stafford Horne
1 sibling, 0 replies; 6+ messages in thread
From: Stafford Horne @ 2017-02-05 7:07 UTC (permalink / raw)
To: linux-kernel
Cc: Stafford Horne, Stephen Warren, Lee Jones, Eric Anholt,
Greg Kroah-Hartman, Daniel Stone, Michael Zoran,
Noralf Trønnes, popcornmix, Stefan Wahren, linux-rpi-kernel,
linux-arm-kernel, devel
Building on openrisc musl toolchain this causes the allyesconfig build
to fail.
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:42:20:
fatal error: stddef.h: No such file or directory
Removing this causes no issues with the build.
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
index d977139..70c530c 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
@@ -39,8 +39,6 @@
#include "vchiq_util.h"
-#include <stddef.h>
-
#define vchiq_status_to_vchi(status) ((int32_t)status)
typedef struct {
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] libceph: Remove unneeded stddef.h include
2017-02-05 7:07 ` [PATCH 1/2] libceph: Remove unneeded stddef.h include Stafford Horne
@ 2017-02-06 10:19 ` Ilya Dryomov
2017-02-06 16:16 ` David Laight
1 sibling, 0 replies; 6+ messages in thread
From: Ilya Dryomov @ 2017-02-06 10:19 UTC (permalink / raw)
To: Stafford Horne
Cc: linux-kernel, Yan, Zheng, Sage Weil, David S. Miller,
Ceph Development, netdev
On Sun, Feb 5, 2017 at 8:07 AM, Stafford Horne <shorne@gmail.com> wrote:
> This was causing a build failure for openrisc when using musl and
> gcc 5.4.0 since the file is not available in the toolchain.
>
> It doesnt seem this is needed and removing it does not cause any build
> warnings for me.
>
> Signed-off-by: Stafford Horne <shorne@gmail.com>
> ---
> net/ceph/snapshot.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/net/ceph/snapshot.c b/net/ceph/snapshot.c
> index 154683f..705414e 100644
> --- a/net/ceph/snapshot.c
> +++ b/net/ceph/snapshot.c
> @@ -18,8 +18,6 @@
> * 02110-1301, USA.
> */
>
> -#include <stddef.h>
> -
> #include <linux/types.h>
> #include <linux/export.h>
> #include <linux/ceph/libceph.h>
Applied.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] libceph: Remove unneeded stddef.h include
2017-02-05 7:07 ` [PATCH 1/2] libceph: Remove unneeded stddef.h include Stafford Horne
2017-02-06 10:19 ` Ilya Dryomov
@ 2017-02-06 16:16 ` David Laight
2017-02-07 2:45 ` Stafford Horne
1 sibling, 1 reply; 6+ messages in thread
From: David Laight @ 2017-02-06 16:16 UTC (permalink / raw)
To: 'Stafford Horne', linux-kernel
Cc: Ilya Dryomov, Yan, Zheng, Sage Weil, David S. Miller, ceph-devel, netdev
From: Stafford Horne
> Sent: 05 February 2017 07:08
> This was causing a build failure for openrisc when using musl and
> gcc 5.4.0 since the file is not available in the toolchain.
>
> It doesnt seem this is needed and removing it does not cause any build
> warnings for me.
Hmmm... stddef.h is part of the SuS v2.
Required to get definitions for NULL, offsetof(), ptrdiff_t and size_t.
So any system that is pretending to by unix-like ought to have one.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] libceph: Remove unneeded stddef.h include
2017-02-06 16:16 ` David Laight
@ 2017-02-07 2:45 ` Stafford Horne
0 siblings, 0 replies; 6+ messages in thread
From: Stafford Horne @ 2017-02-07 2:45 UTC (permalink / raw)
To: David Laight
Cc: linux-kernel, Ilya Dryomov, Yan, Zheng, Sage Weil,
David S. Miller, ceph-devel, netdev
On Mon, Feb 06, 2017 at 04:16:55PM +0000, David Laight wrote:
> From: Stafford Horne
> > Sent: 05 February 2017 07:08
> > This was causing a build failure for openrisc when using musl and
> > gcc 5.4.0 since the file is not available in the toolchain.
> >
> > It doesnt seem this is needed and removing it does not cause any build
> > warnings for me.
>
> Hmmm... stddef.h is part of the SuS v2.
> Required to get definitions for NULL, offsetof(), ptrdiff_t and size_t.
>
> So any system that is pretending to by unix-like ought to have one.
Hello,
I agree, and also I can see that musl and gcc both do provide it. I am
not sure why its not getting included for kernel builds, I didnt look
into it much because on the other hand...
Linux also provides it in 'linux/stddef.h'. In this case vchiq_shim.c
includes "vchiq_util.h".
which includes "linux/string.h"
which includes "linux/stddef.h"
So the requirement seems satisfied.
I am fine to send a patch to change the include to <linux/stddef.h> as I
mentioned in the cover letter. But I dont think its really needed.
-Stafford
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-02-07 2:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-05 7:07 [PATCH 0/2] Remove unneeded stddef.h includes Stafford Horne
2017-02-05 7:07 ` [PATCH 1/2] libceph: Remove unneeded stddef.h include Stafford Horne
2017-02-06 10:19 ` Ilya Dryomov
2017-02-06 16:16 ` David Laight
2017-02-07 2:45 ` Stafford Horne
2017-02-05 7:07 ` [PATCH 2/2] staging: vchip_shim: " Stafford Horne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).