From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752753AbcLUHFa (ORCPT ); Wed, 21 Dec 2016 02:05:30 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:34518 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbcLUHF2 (ORCPT ); Wed, 21 Dec 2016 02:05:28 -0500 MIME-Version: 1.0 In-Reply-To: <871sx28bl0.fsf@linux-m68k.org> References: <1482242389-30006-1-git-send-email-shorne@gmail.com> <201612210415.zQ2N1x5s%fengguang.wu@intel.com> <871sx28bl0.fsf@linux-m68k.org> From: Geert Uytterhoeven Date: Wed, 21 Dec 2016 08:05:26 +0100 X-Google-Sender-Auth: EtGGv0UTjxaCo2T7RnMq6ou1OeY Message-ID: Subject: Re: [PATCH] openrisc: Define __kernel_size_t to suppress compiler warnings To: Andreas Schwab Cc: kbuild test robot , Stafford Horne , "kbuild-all@01.org" , Stefan Kristiansson , openrisc@lists.librecores.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 20, 2016 at 11:44 PM, Andreas Schwab wrote: > On Dez 20 2016, Geert Uytterhoeven 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