linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: kbuild test robot <lkp@intel.com>,
	Stafford Horne <shorne@gmail.com>,
	"kbuild-all@01.org" <kbuild-all@01.org>,
	Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
	openrisc@lists.librecores.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] openrisc: Define __kernel_size_t to suppress compiler warnings
Date: Wed, 21 Dec 2016 08:05:26 +0100	[thread overview]
Message-ID: <CAMuHMdVn8FKEkaNeiYaepKcaE6eofZN9kJ0u0yo0Y1X3P37Bfg@mail.gmail.com> (raw)
In-Reply-To: <871sx28bl0.fsf@linux-m68k.org>

On Tue, Dec 20, 2016 at 11:44 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Dez 20 2016, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> When I saw this patch, I was already a bit skeptical about it, but I noticed
>> other architectures (e.g. avr32) are doing the same, so I didn't reply.
>>
>> In my experience, "format '%zu' expects argument of type 'size_t', but
>> argument 3 has type 'unsigned int'" happens when using a compiler that
>> was not configured to use the correct type (should be unsigned long) for
>> size_t. Typically this happens when using a compiler not configured for
>> a Linux target.
>
> 32-bit targets typically use unsigned int for size_t.  It is part of the
> ABI, so all compilers must agree.  Since or32 is a out-of-tree port, and
> gcc defaults to unsigned long for size_t, mismatches can happen if
> people are using incomplete patches.

Right, thanks for correcting me!
It should indeed be unsigned int on 32-bit, and unsigned long on 64-bit.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2016-12-21  7:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 13:59 [PATCH] openrisc: Define __kernel_size_t to suppress compiler warnings Stafford Horne
2016-12-20 20:22 ` kbuild test robot
2016-12-20 20:45   ` Geert Uytterhoeven
2016-12-20 22:44     ` Andreas Schwab
2016-12-20 23:02       ` Stafford Horne
2016-12-21  7:05       ` Geert Uytterhoeven [this message]
2016-12-21  4:06 ` kbuild test robot

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=CAMuHMdVn8FKEkaNeiYaepKcaE6eofZN9kJ0u0yo0Y1X3P37Bfg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=openrisc@lists.librecores.org \
    --cc=schwab@linux-m68k.org \
    --cc=shorne@gmail.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    /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).