From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Sergei Trofimovich <slyfox@gentoo.org>, linux-ia64@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Fenghua Yu <fenghua.yu@intel.com>,
"H. J. Lu" <hjl.tools@gmail.com>, Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH v3] ia64: fix module loading for gcc-5.4+
Date: Mon, 10 Apr 2017 17:23:28 +0000 [thread overview]
Message-ID: <d8146490-2bc4-3884-a64e-1e5894a023e3@users.sourceforge.net> (raw)
In-Reply-To: <20170408195318.18080-1-slyfox@gentoo.org>
> +++ b/arch/ia64/kernel/module.c
> @@ -153,7 +153,7 @@ slot (const struct insn *insn)
> static int
> apply_imm64 (struct module *mod, struct insn *insn, uint64_t val)
> {
I have got another idea (after your clarification) for the suggested change.
> - if (slot(insn) != 2) {
> + if (slot(insn) != 1 && slot(insn) != 2) {
+ int const s = slot(insn);
+ if (s < 1 || s > 2) {
Do run time characteristics matter for such a condition check here?
> printk(KERN_ERR "%s: invalid slot number %d for IMM64\n",
- mod->name, slot(insn));
+ mod->name, s);
> return 0;
How do you think about my update suggestion for this function implementation?
Regards,
Markus
next prev parent reply other threads:[~2017-04-10 17:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <to=<20170408081449.4872-1-slyfox@gentoo.org>
2017-04-08 19:53 ` [PATCH v3] ia64: fix module loading for gcc-5.4 Sergei Trofimovich
2017-04-09 8:27 ` SF Markus Elfring
2017-04-09 8:51 ` Sergei Trofimovich
2017-04-09 9:02 ` SF Markus Elfring
2017-04-09 10:38 ` Sergei Trofimovich
2017-04-10 17:23 ` SF Markus Elfring [this message]
2017-04-10 21:53 ` [PATCH v3] ia64: fix module loading for gcc-5.4+ Sergei Trofimovich
2017-04-29 18:14 ` [PATCH v3] ia64: fix module loading for gcc-5.4 Sergei Trofimovich
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=d8146490-2bc4-3884-a64e-1e5894a023e3@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=akpm@linux-foundation.org \
--cc=fenghua.yu@intel.com \
--cc=hjl.tools@gmail.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slyfox@gentoo.org \
--cc=tony.luck@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).