Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5805032pxb; Tue, 16 Feb 2021 08:02:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJztiEOaG9A6Gv/FkvbvgBRqmABzr6LwTHDuS1wrpj8AOC2yihu3x9qR1fena+DaxGeDp988 X-Received: by 2002:ac2:42c7:: with SMTP id n7mr12743300lfl.268.1613491372135; Tue, 16 Feb 2021 08:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613491372; cv=none; d=google.com; s=arc-20160816; b=rZurIkC4BEnXqRRYfnSlRma9DmZnO4gfDapYbPepJfjjauRliceAekEPRTrKbKOyaX HDvw4ZxLetkm4ZdlTWG2lg7Mu/QMw5HnkRUlMdzPIxwCWgyP6IdmKlM6x9LDWZbYU3AK 9St0am8oR/spy7SJ9QQEdvPAhN2VxYIRuXzvwnmMYpmgWiLO2JsWrLNDhuAmdmgQFzUp JHwjRgkNjm0PsExagFhVuByoyc2rD9cCJY49uIpcAruKOanUU8nIr3EgXNfiGalDuPyl 4rrms7z7ZtYHdh7/iLX4i4QLhfbG+2ItOyhXuvJ14DSBtLjq5jXiQF71pMdsAaowLkub MkEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=U5MwHTSqqXI5EHEsGiuw6S6hSNDVI6DacBvWsR5KJCY=; b=GjNVneoHfDpWLCu2DVg3grhI28qclJ3NI0WscJw4ysYm1LfiAlE79oJdjfhah0bCDp bjaHOMtgx87pvnin7gv9nZwQVSgxDeULUAxWVEAwYPcmgjOQgv2D74O7yWyOS59OX4QJ kA+o9m2Q3rq8KLZmWvZGieaThKiELggFwJ3oLS+zYMm7qvjIs90aFdyl8mumkNhyenNO P1qIMr6hOwkfX1SOq5pZFccnuq10GnZnBC+FK2dbiCzY2xOI8xpWU47c0At1fOyb6K7X uZ3gNpy8WXPj1ANCUZkGIcII/IaJu34+2tIeCsles3Q08nD3YRIDlE9aJXTZNjMPi/D0 uKxw== 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 v7si17104276edj.572.2021.02.16.08.02.25; Tue, 16 Feb 2021 08:02:52 -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 S230186AbhBPP7V (ORCPT + 99 others); Tue, 16 Feb 2021 10:59:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbhBPP7M (ORCPT ); Tue, 16 Feb 2021 10:59:12 -0500 Received: from hillosipuli.retiisi.eu (hillosipuli.retiisi.eu [IPv6:2a01:4f9:c010:4572::81:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BAF5C061788; Tue, 16 Feb 2021 07:57:27 -0800 (PST) Received: from lanttu.localdomain (lanttu-e.localdomain [192.168.1.64]) by hillosipuli.retiisi.eu (Postfix) with ESMTP id B8B31634CCC; Tue, 16 Feb 2021 17:56:20 +0200 (EET) From: Sakari Ailus To: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org, Andy Shevchenko , linux-kernel@vger.kernel.org, Petr Mladek , Dave Stevenson , hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, mchehab@kernel.org, Sergey Senozhatsky , Steven Rostedt , Joe Perches , Jani Nikula , Rasmus Villemoes , Daniel Vetter , Thomas Zimmermann Subject: [PATCH v9 4/4] drm: Remove drm_get_format_name() Date: Tue, 16 Feb 2021 17:57:23 +0200 Message-Id: <20210216155723.17109-5-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210216155723.17109-1-sakari.ailus@linux.intel.com> References: <20210216155723.17109-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The %p4cc printk format modifier was recently added to print fourcc codes, replacing drm_get_format_name(). The function is no longer needed, so remove it. Signed-off-by: Sakari Ailus Reviewed-by: Petr Mladek Reviewed-by: Andy Shevchenko --- drivers/gpu/drm/drm_fourcc.c | 25 ------------------------- include/drm/drm_fourcc.h | 1 - 2 files changed, 26 deletions(-) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 03262472059c..5cf45aa6eedc 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 @@ -130,26 +125,6 @@ uint32_t drm_driver_legacy_fb_format(struct drm_device *dev, } 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 - */ -const char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf) -{ - snprintf(buf->str, sizeof(buf->str), - "%c%c%c%c %s-endian (0x%08x)", - printable_char(format & 0xff), - printable_char((format >> 8) & 0xff), - printable_char((format >> 16) & 0xff), - printable_char((format >> 24) & 0x7f), - format & DRM_FORMAT_BIG_ENDIAN ? "big" : "little", - format); - - return buf->str; -} -EXPORT_SYMBOL(drm_get_format_name); - /* * Internal function to query information for a given format. See * drm_format_info() for the public API. diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 156b122c0ad5..3ea17b8a79d3 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -318,6 +318,5 @@ unsigned int drm_format_info_block_height(const struct drm_format_info *info, int plane); uint64_t drm_format_info_min_pitch(const struct drm_format_info *info, int plane, unsigned int buffer_width); -const char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf); #endif /* __DRM_FOURCC_H__ */ -- 2.29.2