From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754197AbdBTRKy (ORCPT ); Mon, 20 Feb 2017 12:10:54 -0500 Received: from smtprelay0179.hostedemail.com ([216.40.44.179]:41085 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751538AbdBTRKx (ORCPT ); Mon, 20 Feb 2017 12:10:53 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2551:2559:2562:2828:2915:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:6119:7875:7903:8531:9010:10004:10400:10848:10967:11232:11658:11914:12050:12296:12663:12740:12760:12895:13069:13311:13357:13439:14096:14097:14659:14721:21080:21433:21434:21451:30054:30069:30070:30083: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: salt10_5e157356a211f X-Filterd-Recvd-Size: 2175 Message-ID: <1487610643.2853.6.camel@perches.com> Subject: Re: [PATCH] drm: drm_printer: add __printf validation From: Joe Perches To: Eric Engestrom Cc: Rob Clark , Daniel Vetter , Jani Nikula , Sean Paul , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Mon, 20 Feb 2017 09:10:43 -0800 In-Reply-To: <20170220121750.k5zakwhwta2xrufo@imgtec.com> References: <133858f214e9b90f92bb8eb44c6b1dc04429933d.1487201526.git.joe@perches.com> <20170220121750.k5zakwhwta2xrufo@imgtec.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-02-20 at 12:17 +0000, Eric Engestrom wrote: > On Wednesday, 2017-02-15 15:33:18 -0800, Joe Perches wrote: > > drm_printf does not currently use the compiler to verify > > format and arguments. Make it do so. > > > > Miscellanea: > > > > o Add appropriate #include files for __printf and struct va_format > > o Convert dev_printk to dev_info > > I think these unrelated changes should be in 4 patches: > 1 - add annotation to check the format string against the arguments > (linux/compiler.h should be added here) > 2 - add missing linux/printk.h header for struct va_format > Note that I think a forward declaration is more appropriate here, as > we only use pointers to this struct in this file, we never try to > look inside. On the other hand: > 3 - drm_print.c needs the header in drm_printf(), but as a separate > patch > 4 - convert dev_printk to dev_info (you need to include linux/device.h > there) I am not a big fan of making trivial patches into a series. > You can add my r-b on all four patches when you send them to the list :) If you want to break it up, go ahead.