From: stephen.boyd@linaro.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: traps: Mark __le16, __le32, __user variables properly
Date: Mon, 20 Feb 2017 00:47:57 -0800 [thread overview]
Message-ID: <148758047729.2988.16966413648865610904@sboyd-linaro> (raw)
In-Reply-To: <20170219015808.2vc2kvpde7nlrey4@macbook.local>
Quoting Luc Van Oostenryck (2017-02-18 17:58:09)
> On Fri, Feb 17, 2017 at 08:51:12AM -0800, Stephen Boyd wrote:
>
> > Mark the types appropriately, and force the cast in get_user()
> > when assigning to 0 so sparse doesn't complain.
> I didn't looked deeply at this one but I don't think it is needed.
> Care to give more details?
I think my sparse is old. I was using v0.5.0 from my distro, but using
sparse-next branch from git.kernel.org doesn't show the problem anymore.
I suppose I'll upgrade this machine's sparse version manually to avoid
this problem in the future and withdraw my other patch to asm-generic.
>
>
> > Noticed while making other changes to this file. There are other issues still
> > about marking symbols static, but I'm not sure we want to introduce another
> > header file for the asmlinkage functions?
> Probably not, indeed.
>
> > arch/arm64/kernel/traps.c:567:10: warning: Initializer entry defined twice
> > arch/arm64/kernel/traps.c:568:10: also defined here
> This one I find strange. Can you tell which are those two entries?
>
This is:
static const char *esr_class_str[] = {
[0 ... ESR_ELx_EC_MAX] = "UNRECOGNIZED EC",
[ESR_ELx_EC_UNKNOWN] = "Unknown/Uncategorized",
where we initialize the entire array to an "unknown" value once, and
then fill in the known values after that. This isn't a very common
pattern, but it is used from time to time to avoid having lots of lines
to do the same thing.
next prev parent reply other threads:[~2017-02-20 8:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 16:51 [PATCH] arm64: traps: Mark __le16, __le32, __user variables properly Stephen Boyd
2017-02-17 17:31 ` Russell King - ARM Linux
2017-02-17 17:46 ` Stephen Boyd
2017-02-19 1:58 ` Luc Van Oostenryck
2017-02-20 8:47 ` Stephen Boyd [this message]
2017-02-20 10:04 ` Luc Van Oostenryck
2017-02-20 10:49 ` Mark Rutland
2017-02-20 21:33 ` Luc Van Oostenryck
2017-02-21 11:03 ` Will Deacon
2017-02-22 13:00 ` Luc Van Oostenryck
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=148758047729.2988.16966413648865610904@sboyd-linaro \
--to=stephen.boyd@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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