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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 5CAC9C433DB for ; Mon, 15 Feb 2021 17:09:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E32661606 for ; Mon, 15 Feb 2021 17:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231863AbhBORJc (ORCPT ); Mon, 15 Feb 2021 12:09:32 -0500 Received: from mga01.intel.com ([192.55.52.88]:47735 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbhBOP4u (ORCPT ); Mon, 15 Feb 2021 10:56:50 -0500 IronPort-SDR: kA08KHtOQ8BX2+qApDy7cGEYJ3pB2xMsvWLkidqgFH1o+mhGjaXhx3IK1q3toWVwUbT+NU+Ocu JdUb3+/yBZiw== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="201886113" X-IronPort-AV: E=Sophos;i="5.81,180,1610438400"; d="scan'208";a="201886113" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 07:54:55 -0800 IronPort-SDR: 8ShrDZEX1xRfNPtXowVlgGEsUgQdW6OsYFrW5szNG2KuWQ5PSEcOxw8GcckjNBocJqT6yMSutm bzCD86KeOoDg== X-IronPort-AV: E=Sophos;i="5.81,181,1610438400"; d="scan'208";a="580212299" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 07:54:51 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lBgD1-005GGC-W7; Mon, 15 Feb 2021 17:54:47 +0200 Date: Mon, 15 Feb 2021 17:54:47 +0200 From: Andy Shevchenko To: Sakari Ailus Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Petr Mladek , 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: <20210215135650.GI3@paasikivi.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- With Best Regards, Andy Shevchenko 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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 99651C433E0 for ; Mon, 15 Feb 2021 15:54:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2217B64DDA for ; Mon, 15 Feb 2021 15:54:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2217B64DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CBED6E067; Mon, 15 Feb 2021 15:54:57 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B3586E067 for ; Mon, 15 Feb 2021 15:54:55 +0000 (UTC) IronPort-SDR: i991wOqzmMGCEvwmd5Bklx0tl58nLuL4l7J+vQ7TImluI3EU4NMKUIAJXYT4iX4FDV+jUyATR/ VWRBxB5tB69A== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="162461988" X-IronPort-AV: E=Sophos;i="5.81,180,1610438400"; d="scan'208";a="162461988" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 07:54:55 -0800 IronPort-SDR: 8ShrDZEX1xRfNPtXowVlgGEsUgQdW6OsYFrW5szNG2KuWQ5PSEcOxw8GcckjNBocJqT6yMSutm bzCD86KeOoDg== X-IronPort-AV: E=Sophos;i="5.81,181,1610438400"; d="scan'208";a="580212299" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 07:54:51 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lBgD1-005GGC-W7; Mon, 15 Feb 2021 17:54:47 +0200 Date: Mon, 15 Feb 2021 17:54:47 +0200 From: Andy Shevchenko To: Sakari Ailus 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-Disposition: inline In-Reply-To: <20210215135650.GI3@paasikivi.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , Dave Stevenson , Rasmus Villemoes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hverkuil@xs4all.nl, Sergey Senozhatsky , Steven Rostedt , laurent.pinchart@ideasonboard.com, Joe Perches , mchehab@kernel.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. -- With Best Regards, Andy Shevchenko _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel