Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp330049pxb; Tue, 9 Feb 2021 01:12:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUoaZvvzceBJE0IVQzoggTmHBV+y5fbBsGlrJUItmOkIytaUkHZYyLIcZLxhIU3i3lC7A7 X-Received: by 2002:a17:907:94d4:: with SMTP id dn20mr21309484ejc.397.1612861923043; Tue, 09 Feb 2021 01:12:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612861923; cv=none; d=google.com; s=arc-20160816; b=zJkn+ghhh+4hMkTq5oNUM2mAKpo/Ha2eQYWaFD2iqyakgGZ0EY90PgCoLj2ng1H02+ zf3Ks/EptcergZkYk+IrrP05pzQ5MekTy7haVZ388dzT+7CxHCya8GcR/LgFp5jrOFXP Do8hK+C0e/hAFRzHwIEwdxzAYjArMhStJyr6iEU+eIydCwU7kn+SBxdhGYtKrsaIOXN3 7x5IDS0JOFVnl0kiM5iK4x++av11yXwXMkm116Xld9Uqad5G3ki6siErZDApZZ2EEmNg 7i4XbYtwSuVKaupbYU66VrJ9uzC11mfpj3SPdmq6xH4xCNfyHot+bpWR+NH9ev8FR/gz 8xRg== 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=P+ffIHS1Nk+syWhZquWK0y9j7hVf/ovwMhEdqWMlk3A=; b=vig4yAibZTWtl1xY9NWrcNXWH7QEehWgRRLCgC4kQZHcisXFH0T5bpq1VoBtlWskMW 94RbaGKUPbky93P7VwAprFEoEeAmHgiIemElHUuag06emghHIjoouwsMApp4Rv6y55aQ 29BSM1BwCZ8RfSUJxwW9/nZrZKb8m0O8guMyZFbhLcE64D85yCq3sLrHEHQYXhYnXChO 38vVd2p68TZFedHIT3CLm4sjQtJMOI8F3JqF6pCuVStmxQxjA8QU2QTNuV0dQKW48119 o/s9POL2Htta9jynul41CRi5pmGe+wp9UZT/gPNLFztPg0ECzfWkrV2snQPPjEsmQNVY aKJw== 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 v12si12764113ejq.716.2021.02.09.01.11.39; Tue, 09 Feb 2021 01:12: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 S230288AbhBIJJz (ORCPT + 99 others); Tue, 9 Feb 2021 04:09:55 -0500 Received: from mga12.intel.com ([192.55.52.136]:12467 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230444AbhBIJGG (ORCPT ); Tue, 9 Feb 2021 04:06:06 -0500 IronPort-SDR: D/GSWDht4f3DtbfLGoyF6mqZBOcMEKz+OU3lDqYl4fEm18IZPKUlwZGEn1lkOmcBIhGXGR2CtZ QIG0O3oKJtog== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="161003451" X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="161003451" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 01:03:38 -0800 IronPort-SDR: SU9qFKNtrmpEC6JKaNynq0fO/IFTngaOUhFXJnX/iTmDVW546Xcv/uiyj8dNX0p6k3nyU9cVh5 o+4WbDlsXhSg== X-IronPort-AV: E=Sophos;i="5.81,164,1610438400"; d="scan'208";a="436017955" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 01:03:34 -0800 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 8B611206D0; Tue, 9 Feb 2021 11:03:02 +0200 (EET) Date: Tue, 9 Feb 2021 11:03:02 +0200 From: Sakari Ailus To: Daniel Vetter Cc: Linux Kernel Mailing List , Petr Mladek , Mauro Carvalho Chehab , Dave Stevenson , Rasmus Villemoes , dri-devel , Hans Verkuil , Sergey Senozhatsky , Steven Rostedt , Laurent Pinchart , Joe Perches , Andy Shevchenko , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH v6 3/3] drm/fourcc: Switch to %p4cc format modifier Message-ID: <20210209090302.GB32460@paasikivi.fi.intel.com> References: <20210208200903.28084-1-sakari.ailus@linux.intel.com> <20210208200903.28084-4-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 Daniel, Thanks for the comments. On Tue, Feb 09, 2021 at 08:27:10AM +0100, Daniel Vetter wrote: > On Mon, Feb 8, 2021 at 9:20 PM Sakari Ailus > wrote: > > > > Instead of constructing the FourCC code manually, use the %p4cc printk > > modifier to print it. Also leave a message to avoid using this function. > > > > The next step would be to convert the users to use %p4cc directly instead > > and removing the function. > > > > Signed-off-by: Sakari Ailus > > --- > > drivers/gpu/drm/drm_fourcc.c | 16 +++------------- > > 1 file changed, 3 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > > index 03262472059c..4ff40f2f27c0 100644 > > --- a/drivers/gpu/drm/drm_fourcc.c > > +++ b/drivers/gpu/drm/drm_fourcc.c > > @@ -30,11 +30,6 @@ > > #include > > #include > > > > -static char printable_char(int c) > > -{ > > - return isascii(c) && isprint(c) ? c : '?'; > > -} > > - > > /** > > * drm_mode_legacy_fb_format - compute drm fourcc code from legacy description > > * @bpp: bits per pixels > > @@ -134,17 +129,12 @@ EXPORT_SYMBOL(drm_driver_legacy_fb_format); > > * drm_get_format_name - fill a string with a drm fourcc format's name > > * @format: format to compute name of > > * @buf: caller-supplied buffer > > + * > > + * Please use %p4cc printk format modifier instead of this function. > > I think would be nice if we could roll this out and outright delete > this one here ... Quick git grep says there's not that many, and %p4cc > is quite a bit shorter than what we have now. Sounds good; I can submit patches for that but I think I'll do that once we have the %p4cc modifier in. -- Regards, Sakari Ailus