Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5110794pxb; Mon, 15 Feb 2021 09:44:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRz9A3h1zmuvKzw0VPrIFmw5EMaIjS1Fb4IJGUrWHbgHvHatXNOCNaD3l1w4BdIvOrmuMf X-Received: by 2002:a05:6402:46:: with SMTP id f6mr16777565edu.163.1613411043314; Mon, 15 Feb 2021 09:44:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613411043; cv=none; d=google.com; s=arc-20160816; b=npN/OpO3op7ZJ7UhjniwxWcMGUu3oUK7wf80QXj3K0hrV6jK2ZNQoBouJ1MXp4uWFn If/R5v+g1W/b+x8lfmMgCop9XqG8thqQXPgd3X6zX01i1CpSUtek/RF+93YRkmAKVnhh wR2XngM3pI0aEMARaJWN8gjnIPD5ucfziXR7WYZgVxHygBh387cryygXbsmO2OTvfhhB dcsGzlDvaQO2DbjfQqk1UZ8gJCHTzv+Vxf98RY73iIlTWV4JWqzj1tJzC7GS7WW7b9xi dAbukw54yVR6LdDeq4EZ5eYqz7ZXmLozTQcOr0oPMrKqB8PhGqMqzh0BSslOS/VXNhsn FKlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=9yPE3q9DjHZ0+FmxT3zhiyDvtsM0uVMU1vpoxJPq9ZU=; b=KUM3UhciikhDMeeGtyLchR2P+UzQCk/CTcshShyLzI0I7VvxPArWAgvTPJzbsVZ+YK UxPtUxF8Otwq1M34dZ0GazpedYC20JNJmSmbLuWGLrXpy8mZXh2XWdAGL08tOUCDi3v+ q45uZjml1GiLVCFZlOlX6EP2LFyUt6g/Lhl2vXiicPEecPW4flLgqzB7YjttNPLITzZI SGmqfbm/0xzXFAfmSSviWqL/27vFzRiMXDBqOFFO5zkm3QtkH67L5ga+vFCVk3dP8IBS byOCU1i5pm4/gL4+368Brp4N4IYLBkRulUfI5vbNgfIFV+WGmVXlhuZH3lgSo+XSL/bt TgrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs7si14705240ejc.745.2021.02.15.09.43.38; Mon, 15 Feb 2021 09:44:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232059AbhBORmo (ORCPT + 99 others); Mon, 15 Feb 2021 12:42:44 -0500 Received: from mga06.intel.com ([134.134.136.31]:41954 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230418AbhBORXb (ORCPT ); Mon, 15 Feb 2021 12:23:31 -0500 IronPort-SDR: c7saTC4Hoxn0Ow8Ey35yhqMKKF6wdAD0TgtD8L2/DoapXTK1i9U7Z/SHwUWNe+j+b0GUJQGwYM 7yc8gUl2wY6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="244206736" X-IronPort-AV: E=Sophos;i="5.81,181,1610438400"; d="scan'208";a="244206736" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 09:21:40 -0800 IronPort-SDR: geRpXhgmUT9FMi4UccziIcMxaTZyiBds3SjXanW6DPrJxmk0e5swhB0HicfkwGS4oAhIIEeQTL su/W5+KEreZg== X-IronPort-AV: E=Sophos;i="5.81,181,1610438400"; d="scan'208";a="588917260" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 09:21:35 -0800 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 2A17320518; Mon, 15 Feb 2021 19:21:03 +0200 (EET) Date: Mon, 15 Feb 2021 19:21:03 +0200 From: Sakari Ailus To: Petr Mladek Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Dave Stevenson , dri-devel@lists.freedesktop.org, hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, mchehab@kernel.org, Sergey Senozhatsky , Steven Rostedt , Joe Perches , Jani Nikula , Rasmus Villemoes Subject: Re: [PATCH v7 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs Message-ID: <20210215172103.GJ3@paasikivi.fi.intel.com> References: <20210215114030.11862-1-sakari.ailus@linux.intel.com> <20210215114030.11862-2-sakari.ailus@linux.intel.com> <20210215135650.GI3@paasikivi.fi.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 Petr, On Mon, Feb 15, 2021 at 05:51:40PM +0100, Petr Mladek wrote: > On Mon 2021-02-15 17:54:47, Andy Shevchenko wrote: > > On Mon, Feb 15, 2021 at 03:56:50PM +0200, Sakari Ailus wrote: > > > On Mon, Feb 15, 2021 at 03:31:29PM +0200, Andy Shevchenko wrote: > > > > On Mon, Feb 15, 2021 at 01:40:28PM +0200, 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. > > > > > > > > This version I almost like, feel free to add > > > > Reviewed-by: From: Andy Shevchenko > > > > after considering addressing below nit-picks. > > > > > > > +Examples:: > > > > > + > > > > > + %p4cc BG12 little-endian (0x32314742) > > > > > > > > No examples with spaces / non-printable / non-ascii characters > > > > > > I can sure add an example that has a space. But do you think I really > > > should add an example where invalid information is being printed? > > > > I think you have to provide better coverage of what user can get out of this. > > Perhaps one example with space and non-printable character is enough. > > > > > > > + char output[sizeof("1234 little-endian (0x01234567)")]; > > > > > > > > 1234 -> ABCD ? (Or XY12 to be closer to the reality) > > > > > > I count in numbers... albeit the hexadecimal number there starts from zero. > > > > > > I guess both would work though. > > > > > > 0123 would be consistent. > > > > Since letters can be printed the above is confusing a bit. I think XY12 is > > closer to the reality than 0123. > > Ailus, are you going to send v8 with the two small changes? I mean a > selftest with the space and the above sample code. Yes, and a few more examples. > > Anyway, feel free to add: > > Reviewed-by: Petr Mladek Thank you. It'd be great if we could merge this through the printk tree. Acks are needed from the DRM people first. -- Regards, Sakari Ailus