From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754385AbcLTXCW (ORCPT ); Tue, 20 Dec 2016 18:02:22 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34655 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752084AbcLTXCU (ORCPT ); Tue, 20 Dec 2016 18:02:20 -0500 Date: Wed, 21 Dec 2016 08:02:17 +0900 From: Stafford Horne To: Andreas Schwab Cc: Geert Uytterhoeven , kbuild test robot , "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 Message-ID: <20161220230217.GJ2650@lianli.shorne-pla.net> References: <1482242389-30006-1-git-send-email-shorne@gmail.com> <201612210415.zQ2N1x5s%fengguang.wu@intel.com> <871sx28bl0.fsf@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871sx28bl0.fsf@linux-m68k.org> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Dec 20, 2016 at 11:44:43PM +0100, 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. Thanks, To tell the truth I was skeptical of this patch as well. But I figured I could send out the patch and see what kind of feedback it would get. I was expecting compiler actually, but wasn't sure exactly where. So this is the best feedback I could have expected. Thanks. I am using gcc with newlib 'or1k-elf-'. I also have a musl, linux, target compiler. I will look into that. -Stafford