Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3551714imb; Tue, 5 Mar 2019 12:22:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzx9eYX67ebJ1AD/xYIeX80yd8dA7yGd/bvyi5ZqTWoNOoNxiiLk1suac4EDtPmjZbZnRT+ X-Received: by 2002:a65:4b83:: with SMTP id t3mr2974550pgq.417.1551817339874; Tue, 05 Mar 2019 12:22:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551817339; cv=none; d=google.com; s=arc-20160816; b=BVb1ORmuBQRIP+sEsQKB6iQa2E2JFlGk63dYLvN8MF2PfIHYvJeAVtNaLgJ6xQDwxm V0tPdmNx7ApGxFqPcGDJpjvt0GyLg2klBSlO7tTKLXbznG3N0YRBomWl7mmLsjjCD+oJ chrMqzrm7aY1YMLe1KPIe7+xxTAk+fL7DozAb7M1XMpk+ZVee9gEbfSRxB0WMrkf+Z0g 3+OxYRCSx9XTlQANol7N2/Njf8gZ7Gv52twtGTHa02Bp3yFJOYc3KDn2DWho5xf1paVN g6PKb77KCyc7aOcVsGqlORfo6rQkSLHkfL+BD5ue18t2Kh0jw0uA7XDkcEJtu3I7At8k 78sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=40D6K6EpbEFhKKgiLw0YEfo5eBYIhijPBoNIjGTdV/I=; b=Rqz2KoQAl0cmXV6GaI5l7E+hG9UWxek1MC1XryuPOh3X1cHX8ewp8D8wM0G7swwFqx ZwqxmPReU9B7LUrvRLxPC5R91kHBvKYFAEsjiaA745iWMt/9ZhDPEoEBEfxZJLZKa5ZF WsYWkzNIV6MHKFP2Hn2ILPVNjcvV0lHLYcpsVpEkpX5byeoNzNwFQtPh/y8QdENcpH8s vAmuFRhK8jivNYq+B7qnhX9eVRRdYfgr4DSxqdNjwXViIXwCF7ii0dTok/VRM3Vh7Bgt zMI2c7InkNVUOcCyURTu2PRFVlNGRnnxUcjwIxxMdgKApMf9xKPT1HOoOl2Zv/JCC1qU /ZJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=BZH30xY7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t135si9025979pgb.467.2019.03.05.12.22.04; Tue, 05 Mar 2019 12:22:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=BZH30xY7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728155AbfCEULg (ORCPT + 99 others); Tue, 5 Mar 2019 15:11:36 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48610 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfCEULg (ORCPT ); Tue, 5 Mar 2019 15:11:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=x9SGw30xc4tViDSHp9clTrj2CNLlRzCFkYvhGOCoSwo=; b=BZH30xY77voSA2DMnNBrdgaO5 XTV127Nqakg+r5MUxKy28mGRcTPkS6hH4ddVH4AGkb7Vlv/jpeszRAT3GWb5RGAmkI9eVMF3TjPU4 Fj10igEtO2uVs5vA29iLxZ82mjkRxxFF1QMmc+QBzCH8QMFYy3BQPOYt9KCcaXlMna/jFUotHGEkt ra6EGEy6HkH6syktgdxZb7Pt1arCZ/RDwqYQQZUrym0otDd2dosURN2SVK3JXYkfO5ys39YETNlUd d3EsovvQurAEeBxZS93jwQE1CkX/BuaE1UHdoeD4JL0tbHvxwhPc1/V1LPT8hinUFFUmJItb4viwn 67YwES6ng==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1GPR-0003CE-Pf; Tue, 05 Mar 2019 20:11:29 +0000 Date: Tue, 5 Mar 2019 12:11:29 -0800 From: Matthew Wilcox To: Joe Perches Cc: Nick Desaulniers , Andy Shevchenko , Louis Taylor , Jonathan Corbet , pmladek@suse.com, geert+renesas@glider.be, linux-doc@vger.kernel.org, LKML , clang-built-linux@googlegroups.com, Jon Flatley Subject: Re: [PATCH] docs: add extra integer types to printk-formats Message-ID: <20190305201129.GH13380@bombadil.infradead.org> References: <20190303123647.22020-1-louis@kragniz.eu> <20190303201016.GO9224@smile.fi.intel.com> <20190305200725.GG13380@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190305200725.GG13380@bombadil.infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 05, 2019 at 12:07:25PM -0800, Matthew Wilcox wrote: > On Tue, Mar 05, 2019 at 11:59:30AM -0800, Joe Perches wrote: > > Many of the -Wformat warnings are bogus too. > > > > There's nothing wrong with using %x for a unsigned int > > of less than long size. (u8/u16) > > I believe you to be incorrect. No, you're right, I got tangled up in the spec language and stopped reading too soon. > 6.5.2.2 Function calls > > 7 If the expression that denotes the called function has a type that does > include a prototype, the arguments are implicitly converted, as if by > assignment, to the types of the corresponding parameters, taking the > type of each parameter to be the unqualified version of its declared > type. The ellipsis notation in a function prototype declarator causes > argument type conversion to stop after the last declared parameter. The > default argument promotions are performed on trailing arguments. ... the default argument promotions performed on the trailing arguments promote short/char to int. So you were right. > I could define a calling convention for my CPU which says to pack u8s > and u16s as tightly as possible in registers (or on the stack), rather > than the prevailing calling convention of having each argument take up > at least one register-sized slot. ... and that is just wrong; it's not allowed.