From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CDC1C433FE for ; Thu, 10 Dec 2020 13:57:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A90623119 for ; Thu, 10 Dec 2020 13:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389773AbgLJN5W (ORCPT ); Thu, 10 Dec 2020 08:57:22 -0500 Received: from mga12.intel.com ([192.55.52.136]:31178 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389761AbgLJN5T (ORCPT ); Thu, 10 Dec 2020 08:57:19 -0500 IronPort-SDR: ax8s0qgw/LucKMSCGW16dRaY+YcxxtjuVaSM6N+nhcf3ml9mf5sSYRXS2WCnNXl/XNa/dglCgz NkahukKm0y7A== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="153489126" X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="153489126" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 05:55:32 -0800 IronPort-SDR: do9N5KAms1qR1BOwmxto6A9gdtKSLM0DRNag1vpRcF0IUs+o5GUMiJyk2pQIUo7Qq+z5wAtONr 3hHkpPXoLG1w== X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="371650813" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 05:55:29 -0800 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 1BFBB20867; Thu, 10 Dec 2020 15:55:27 +0200 (EET) Date: Thu, 10 Dec 2020 15:55:27 +0200 From: Sakari Ailus To: Andy Shevchenko Cc: Petr Mladek , Linux Kernel Mailing List , Linux Media Mailing List , Andy Shevchenko , Dave Stevenson , dri-devel , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , Sergey Senozhatsky , Steven Rostedt , Joe Perches , Jani Nikula , Rasmus Villemoes Subject: Re: [PATCH v5 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs Message-ID: <20201210135526.GH25763@paasikivi.fi.intel.com> References: <20201113105441.1427-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Thu, Dec 10, 2020 at 03:05:02PM +0200, Andy Shevchenko wrote: > On Thu, Dec 10, 2020 at 2:16 PM Petr Mladek wrote: > > On Fri 2020-11-13 12:54:41, Sakari Ailus wrote: > > > Add a printk modifier %p4cc (for pixel format) for printing V4L2 and DRM > > > pixel formats denoted by fourccs. The fourcc encoding is the same for both > > > so the same implementation can be used. > > > > > > Suggested-by: Mauro Carvalho Chehab > > > Signed-off-by: Sakari Ailus > > > > Andy, Rasmus, > > > > the last version looks fine to me. I am going to push it. > > Please, speak up if you are against it. > > My concerns are: > - not so standard format of representation (why not to use > string_escape_mem() helper?) or is it? The format string may contain spaces that are not meant to be printed. Other unprintable chacaters should not be present (at least not in V4L2 pixelformats). The hexadecimal representation is there to convey the numerical value and that originally came from DRM, not V4L2. > - no compatibility with generic 4cc > (I would rather have an additional specifier here for v4l2 cases. What do you mean by "generic 4cc"? There are two users of 4cc codes in the kernel that I know of: V4L2 and DRM. Something that does not refer to in-memory pixel formats? > OTOH generic %p4cc to me sounds like an equivalent to %4pEh (but we > have similar cases with MAC where %6ph is the same as %pM). > > But I'm not insisting on them, consider it like just my 2 cents to the > discussion. Ack. -- Kind regards, Sakari Ailus