* [PATCH] h8300:let the checker know that size_t is ulong
@ 2018-05-30 21:03 Luc Van Oostenryck
2018-07-22 14:02 ` Yoshinori Sato
0 siblings, 1 reply; 2+ messages in thread
From: Luc Van Oostenryck @ 2018-05-30 21:03 UTC (permalink / raw)
To: Yoshinori Sato; +Cc: uclinux-h8-devel, linux-kernel, Luc Van Oostenryck
All 64bit archs use unsigned long for size_t and most 32bit
archs use 'unsigned int'. By default, this is what is assumed
by sparse.
However, on h8300 (a 32bit arch) size_t is unsigned long which
can led sparse to emit wrong warnings.
Fix this by passing to sparse the flag -msize-long, telling it
that size_t is unsigned long.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
arch/h8300/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index e1c02ca23..eaac6685f 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -22,6 +22,8 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
KBUILD_AFLAGS += $(aflags-y)
LDFLAGS += $(ldflags-y)
+CHECKFLAGS += -msize-long
+
ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := h8300-unknown-linux-
endif
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] h8300:let the checker know that size_t is ulong
2018-05-30 21:03 [PATCH] h8300:let the checker know that size_t is ulong Luc Van Oostenryck
@ 2018-07-22 14:02 ` Yoshinori Sato
0 siblings, 0 replies; 2+ messages in thread
From: Yoshinori Sato @ 2018-07-22 14:02 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: uclinux-h8-devel, linux-kernel
On Thu, 31 May 2018 06:03:43 +0900,
Luc Van Oostenryck wrote:
>
> All 64bit archs use unsigned long for size_t and most 32bit
> archs use 'unsigned int'. By default, this is what is assumed
> by sparse.
>
> However, on h8300 (a 32bit arch) size_t is unsigned long which
> can led sparse to emit wrong warnings.
>
> Fix this by passing to sparse the flag -msize-long, telling it
> that size_t is unsigned long.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> arch/h8300/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
> index e1c02ca23..eaac6685f 100644
> --- a/arch/h8300/Makefile
> +++ b/arch/h8300/Makefile
> @@ -22,6 +22,8 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
> KBUILD_AFLAGS += $(aflags-y)
> LDFLAGS += $(ldflags-y)
>
> +CHECKFLAGS += -msize-long
> +
> ifeq ($(CROSS_COMPILE),)
> CROSS_COMPILE := h8300-unknown-linux-
> endif
> --
> 2.17.0
>
Sorry too late replay.
Applied to h8300-next.
Thanks.
--
Yosinori Sato
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-22 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-30 21:03 [PATCH] h8300:let the checker know that size_t is ulong Luc Van Oostenryck
2018-07-22 14:02 ` Yoshinori Sato
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.