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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 B8DA8C433DB for ; Tue, 9 Feb 2021 10:02:00 +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 2625D64E60 for ; Tue, 9 Feb 2021 10:02:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2625D64E60 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 5AD5A6EAAD; Tue, 9 Feb 2021 10:01:59 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 376146EAAD for ; Tue, 9 Feb 2021 10:01:58 +0000 (UTC) IronPort-SDR: oLnjjPl5rtoT7+keAZgQJzP61w26k4I3GZ1vdsuQl0NpN9NWHFrNqRW9/5lLxPDu88AiRdRFRq MNoUJ54oR7wQ== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="181919580" X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="181919580" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 02:01:57 -0800 IronPort-SDR: rnhFjJZUyagX9l6NkVSwVAXDoAYjA0WCGcS4e8PMLA+skaUN9neEPOnOysaFZHrDDu8mqtWyRN FM7iNXXX6yxQ== X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="509823432" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 02:01:54 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l9PqA-003BrA-CZ; Tue, 09 Feb 2021 12:01:50 +0200 Date: Tue, 9 Feb 2021 12:01:50 +0200 From: Andy Shevchenko To: Sakari Ailus Subject: Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs Message-ID: References: <20210208200903.28084-1-sakari.ailus@linux.intel.com> <20210208200903.28084-2-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 Mailing List , dri-devel , Hans Verkuil , Sergey Senozhatsky , Steven Rostedt , Laurent Pinchart , Joe Perches , Mauro Carvalho Chehab , Linux Media Mailing List 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 08, 2021 at 10:58:55PM +0200, Andy Shevchenko wrote: > On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > > On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus > > wrote: ... > __le32 val; > > val = cpu_to_le32(*fourcc & ~BIT(31)); > > p += string_escape_mem(&val, sizeof(*fourcc), output, sizeof(output), ESCAPE_NP | ESCAPE_HEX, NULL); sizeof(val) and as we are discussing in parallel emails something like skip_trailing_spaces() to be applied after above. The rationale of the above, that we reuse existing code and existing standard for the escaping non-printable characters. -- With Best Regards, Andy Shevchenko _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel