Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2289778ybb; Thu, 2 Apr 2020 17:28:01 -0700 (PDT) X-Google-Smtp-Source: APiQypJxTj5+L9DLuB/FF7q7qc2RdtWe/cpvnk/Fkg1fkb4dY4wUF+L2psNWbUnAsRk6l223J8dt X-Received: by 2002:a54:4189:: with SMTP id 9mr1274860oiy.128.1585873681303; Thu, 02 Apr 2020 17:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585873681; cv=none; d=google.com; s=arc-20160816; b=yQ1gxA4kfHBSODmxLPxeI8Lf/wEOndEkpvD3P8hYZ2Jr7zYKAUZnOhR8qy0+FK8hu0 eVUTLQPQ6L4u1AUAFrN6zLJzrW23W68t+oBXGsZ0kVAfIZC14JD0DOHendQBUGpVE44p igbusG8bWQx+IRAtKTttI+O/32EaQ9MpMvl6nYOTkzpDDEQ3hhTiahs4f4nUL8YoRzKh wVdy514Xq/zybKIEDD3ac/HctrWyGVwhdnwuW6xgfTdKX+p3prxi0nNGczui6u3jKkY9 bQJlbDIJrtPl2c7VcGHiLJIYeNtlW8f93J8aENuA60lGQ40A1z/mp1oIhpE0B0S5KDyq wpmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=GbzAzDytSjNsF5JiDi4qAm/5x3u+Fi5YZzIieZEw1vU=; b=YSZkhiboDpPbFEE4tCCLcm3aa2HCy0NTgjvIqapUzagn/7G+gqCUQZEmU5nbIsbrOp mJiC/xVcYIIsRexYexF3tuf1/2JOlz3mw8btKfCjdkm680hj0w7VPnCc+5REDgz+5QeB IeaLGVD7lzw4X9gRHUksYDCXUXb24XDnN2vEWiLp+tM3kMCg0jiPpNEj57A22OySWyIL WT0bE7e+XTshdyp1ZXvH1lcyHnsj+8DPCMUzprqbyaLP6PP9xIOp9E+MVRTmyPNcPKc/ xwBETt4PdfLm1j+sidW652SJAC4z44ZC04KbcYxpVsOKV7+eD3VyMA5pUYtJ/yUunZP0 qMTg== ARC-Authentication-Results: i=1; mx.google.com; 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 f207si3050751oib.65.2020.04.02.17.27.48; Thu, 02 Apr 2020 17:28:01 -0700 (PDT) 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; 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 S2390163AbgDBX2L (ORCPT + 99 others); Thu, 2 Apr 2020 19:28:11 -0400 Received: from smtprelay0216.hostedemail.com ([216.40.44.216]:36478 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387919AbgDBX2L (ORCPT ); Thu, 2 Apr 2020 19:28:11 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id E4123182CED2A; Thu, 2 Apr 2020 23:28:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3873:3874:4321:5007:6119:6120:6742:7901:7903:10004:10400:10848:11232:11658:11914:12043:12297:12663:12740:12760:12895:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:21433:21611:21627:30054:30069:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: horse36_cc82b9208349 X-Filterd-Recvd-Size: 2399 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Thu, 2 Apr 2020 23:28:07 +0000 (UTC) Message-ID: <04bb934e551f43540d1daacd2759beacc0b3116a.camel@perches.com> Subject: Re: [PATCH 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs From: Joe Perches To: Jani Nikula , Sakari Ailus , Petr Mladek Cc: mchehab@kernel.org, Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hverkuil@xs4all.nl, Sergey Senozhatsky , Steven Rostedt , laurent.pinchart@ideasonboard.com, Andy Shevchenko , linux-media@vger.kernel.org, Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Date: Thu, 02 Apr 2020 16:26:11 -0700 In-Reply-To: <87eet6mgk7.fsf@intel.com> References: <20200401140522.966-1-sakari.ailus@linux.intel.com> <87eet6mgk7.fsf@intel.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-04-02 at 11:34 +0300, Jani Nikula wrote: > On Wed, 01 Apr 2020, Sakari Ailus wrote: > > Add a printk modifier %ppf (for pixel format) for printing V4L2 and DRM > > pixel formats denoted by 4ccs. The 4cc encoding is the same for both so > > the same implementation can be used. > > I'm not going to take a strong stand in one way or the other regarding > the patch at hand, but I do think at some point we have to draw a line > what should be included in printk formats. Arguably they should be > reserved to things that are generally useful across large parts of the > kernel, right? Definitely yes. > I think the more specialized you get, the more you should think about > just using the plain old %s, and your own helpers. Because frankly, the > kernel printk specifiers also start getting more than a little obscure. > > Or could we conceive of a way to make this locally extensible yet safe, > letting callers use something like %{foo}, as well as providing a > locally relevant function to do the conversion? No. printf validation would be broken.