From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753939AbbLCXlN (ORCPT ); Thu, 3 Dec 2015 18:41:13 -0500 Received: from smtprelay0122.hostedemail.com ([216.40.44.122]:45002 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751446AbbLCXlM (ORCPT ); Thu, 3 Dec 2015 18:41:12 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2525:2560:2563:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3866:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6261:8599:9025:10004:10400:10848:11026:11232:11473:11658:11914:12043:12048:12438:12517:12519:12555:12740:13069:13311:13357:13894:14659:21080:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: pets09_a20397529319 X-Filterd-Recvd-Size: 1941 Message-ID: <1449186068.17296.11.camel@perches.com> Subject: Re: [PATCH v3 04/14] lib/vsprintf.c: expand field_width to 24 bits From: Joe Perches To: Andy Shevchenko , Rasmus Villemoes , Andrew Morton , Kees Cook , Martin Kletzander Cc: Andy Shevchenko , Maurizio Lombardi , Tejun Heo , linux-kernel@vger.kernel.org Date: Thu, 03 Dec 2015 15:41:08 -0800 In-Reply-To: <1449178138.15393.161.camel@linux.intel.com> References: <1449175873-1780-1-git-send-email-linux@rasmusvillemoes.dk> <1449175873-1780-5-git-send-email-linux@rasmusvillemoes.dk> <1449176047.17296.4.camel@perches.com> <1449178138.15393.161.camel@linux.intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-12-03 at 23:28 +0200, Andy Shevchenko wrote: > On Thu, 2015-12-03 at 12:54 -0800, Joe Perches wrote: > > On Thu, 2015-12-03 at 21:51 +0100, Rasmus Villemoes wrote: [] > > > I didn't find a BUILD_BUG/compiletime_assertion/... which would work > > > outside function context, so for now I just open-coded it. > > > > > > [1] http://thread.gmane.org/gmane.linux.kernel/2034835 [] > I like most of the stuff here, though, can we avoid open-coded > BUILD_BUG_ON()? Not so far as I can know.  Maybe another generic could be added. It doesn't seem this specific check is all that useful. sizeof(struct printf_spec) != 8 I suppose there could be an assert in some function instead.