Re: [PATCH v3] ia64: fix module loading for gcc-5.4+
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Sergei Trofimovich <slyfox@xxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx
- Subject: Re: [PATCH v3] ia64: fix module loading for gcc-5.4+
- From: SF Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Apr 2017 19:23:28 +0200
- Cc: linux-kernel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, "H. J. Lu" <hjl.tools@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>
- In-reply-to: <20170408195318.18080-1-slyfox@gentoo.org>
- References: <to=<20170408081449.4872-1-slyfox@gentoo.org> <20170408195318.18080-1-slyfox@gentoo.org>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0
> +++ 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
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]