[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180621145356.GB12445@infradead.org>
Date: Thu, 21 Jun 2018 07:53:56 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Andreas Schwab <schwab@...e.de>
Cc: Christoph Hellwig <hch@...radead.org>, aou@...s.berkeley.edu,
palmer@...ive.com, linux-kernel@...r.kernel.org,
greentime@...estech.com, Zong Li <zong@...estech.com>,
linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 5/5] RISC-V: Use fixed width integer types for 32-bit
compatible
On Thu, Jun 21, 2018 at 12:21:19PM +0200, Andreas Schwab wrote:
> On Jun 20 2018, Christoph Hellwig <hch@...radead.org> wrote:
>
> >> static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)
> >> {
> >> if (v != (u32)v) {
> >> - pr_err("%s: value %016llx out of range for 32-bit field\n",
> >> + pr_err("%s: value %016" PRIxX "out of range for 32-bit field\n",
> >> me->name, v);
> >> return -EINVAL;
> >
> > But in general Linux uXX and sXX values are always the same underlying
> > fundamental C type. What is the mismatch here?
>
> The mismatch is that v is Elf_Addr, not u32.
Then we'll have to cast to unsigned long before printing, like we
do elsewhere in kernel.
Powered by blists - more mailing lists