Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933994AbcLTWow (ORCPT ); Tue, 20 Dec 2016 17:44:52 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:51757 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752132AbcLTWou (ORCPT ); Tue, 20 Dec 2016 17:44:50 -0500 X-Auth-Info: 9xS5MF6SWTQbFgeavvFWI0dMp7alcJl/C0YBNlovvhweU/bKRscPMZc83hhnhoM5 From: Andreas Schwab To: Geert Uytterhoeven Cc: kbuild test robot , Stafford Horne , "kbuild-all\@01.org" , Stefan Kristiansson , openrisc@lists.librecores.org, "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH] openrisc: Define __kernel_size_t to suppress compiler warnings References: <1482242389-30006-1-git-send-email-shorne@gmail.com> <201612210415.zQ2N1x5s%fengguang.wu@intel.com> X-Yow: Yow! It's some people inside the wall! This is better than mopping! Date: Tue, 20 Dec 2016 23:44:43 +0100 In-Reply-To: (Geert Uytterhoeven's message of "Tue, 20 Dec 2016 21:45:56 +0100") Message-ID: <871sx28bl0.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 957 Lines: 22 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. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."