Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5106519pxb; Mon, 15 Feb 2021 09:37:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5i0tmejmdYaC0SRBR58NwlxHNGZ9/4XBG04GmFo2W7/W6aegEmnWrVVbNuJLf1OY2Eap7 X-Received: by 2002:a50:ee16:: with SMTP id g22mr5868516eds.235.1613410641154; Mon, 15 Feb 2021 09:37:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613410641; cv=none; d=google.com; s=arc-20160816; b=gi1QYC+1LQrlMcp+yegFxXwb1rbTQVrL4N9S6c4krKUhPZm3MbQceCOP4glVPxwyYy Hh9IfzJwLFTXcKCIXs7lJSqw1ZqRnJV+cSdEFVv6Z23pq+evlfQeits5bhCadt53pJxB 6drAqSIoe/Cyc7arZku2H8tYr4kEmaw7YVDNIIJd0FO+jhM7yirkU645hN0xgaRP81RY 5PoK32/bUjCbl8eCuqyKBX8dhAIF5aDiTyF4Wig3Cw++GB3z2kjT7qsh86GSurvYYJzL Qv9XaeE3ZZQevqBD3XpAfHe5W/DnC8catBtZgcHjWy9czbH3+jYXr6sIgk0zJwL3cClf WQmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ONeikQRqvI8vO+u2stRNdyN0o/niRr+9mGXHQZCXCpw=; b=EZO9LTOLwlwtlgNWKJT4Bo7g3qBx+O4fXOSzlB2fXn0V7v3DTs2s7fP235knv5Swet fhzSMjhJ6vety7IDaVkPn1/7f7nW89gSlKuzAlXQWc4rBJHPPnOH/35IW8P1U9OpLKAp IrMl06OLJFiR6qdYX/e5qvrdsNHStTeh6VN2SjxY+yNMY4OyhQoq3cXpkqejG+DUhEJT g8nrX1lD8S6g8Ria0NsXcaCHfh7uIGeBDMlFKJ7Ac2MdAgt5W15PHJOHTa8geZM9oqfd FtPuhHfGqClJaImGgOY3PmIXNG5dZxZbWWNMyZi9f358wrSapTxGlyQHWsQsiZ2mVx+Y nAbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=tdKGa5VF; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si12518593edc.111.2021.02.15.09.36.57; Mon, 15 Feb 2021 09:37:21 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=tdKGa5VF; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbhBORgQ (ORCPT + 99 others); Mon, 15 Feb 2021 12:36:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:48370 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231697AbhBOQwc (ORCPT ); Mon, 15 Feb 2021 11:52:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613407901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ONeikQRqvI8vO+u2stRNdyN0o/niRr+9mGXHQZCXCpw=; b=tdKGa5VF4nYtqpU6FUa8Wn78eOmIAtepFjkmtjM7/ybo1cxrmUcZwE3D9pBP/3bV0tKjZb KEuBsR3lHjqJsxE+uW/D+Dt4yFvQRaPhdbJ1laV43+G40MiH5LB+mTSLXGWdAG9SJNkqXo z1QulDqYZiDoZtOgbs0MBvp+v0s1QLg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 43FE5AD19; Mon, 15 Feb 2021 16:51:41 +0000 (UTC) Date: Mon, 15 Feb 2021 17:51:40 +0100 From: Petr Mladek To: Andy Shevchenko Cc: Sakari Ailus , 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: 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Anyway, feel free to add: Reviewed-by: Petr Mladek Best Regards, Petr