Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
To: linux-riscv@lists.infradead.org
Subject: [PATCH 5/5] RISC-V: Use fixed width integer types for 32-bit compatible
Date: Thu, 21 Jun 2018 07:53:56 -0700	[thread overview]
Message-ID: <20180621145356.GB12445@infradead.org> (raw)
In-Reply-To: <mvmwousjv8g.fsf@suse.de>

On Thu, Jun 21, 2018 at 12:21:19PM +0200, Andreas Schwab wrote:
> On Jun 20 2018, Christoph Hellwig <hch@infradead.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.

      reply	other threads:[~2018-06-21 14:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  1:41 [PATCH 0/5] Building for 32-bit RISC-V kernel Zong Li
2018-06-21  1:41 ` [PATCH 1/5] RISC-V: Add conditional macro for zone of DMA32 Zong Li
2018-06-21  6:40   ` Christoph Hellwig
2018-06-21  7:06     ` Zong Li
2018-06-21  1:41 ` [PATCH] RISC-V: Add conditional marco for boot_sec_cpu Zong Li
2018-06-21  1:41 ` [PATCH 2/5] RISC-V: Select GENERIC_UCMPDI2 on RV32I Zong Li
2018-06-21  1:41 ` [PATCH 3/5] RISC-V: Add definiion of extract symbol's index and type for 32-bit Zong Li
2018-06-21  1:41 ` [PATCH 4/5] RISC-V: Change variable type for 32-bit compatible Zong Li
2018-06-21  6:41   ` Christoph Hellwig
2018-06-21  7:12     ` Zong Li
2018-06-21 15:19       ` Zong Li
2018-06-21  1:41 ` [PATCH 5/5] RISC-V: Use fixed width integer types " Zong Li
2018-06-21  6:43   ` Christoph Hellwig
2018-06-21 10:13     ` Zong Li
2018-06-21 10:21     ` Andreas Schwab
2018-06-21 14:53       ` Christoph Hellwig [this message]

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=20180621145356.GB12445@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-riscv@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