From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp,
linux-kernel@vger.kernel.org,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH] h8300:let the checker know that size_t is ulong
Date: Wed, 30 May 2018 23:03:43 +0200 [thread overview]
Message-ID: <20180530210343.22320-1-luc.vanoostenryck@gmail.com> (raw)
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
next reply other threads:[~2018-05-30 21:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 21:03 Luc Van Oostenryck [this message]
2018-07-22 14:02 ` Yoshinori Sato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180530210343.22320-1-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®