From patchwork Mon May 25 01:48:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1297047 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XhLxv9hy; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Vg6W2rd7z9sPF for ; Mon, 25 May 2020 11:50:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8FEC812EC; Mon, 25 May 2020 03:49:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XhLxv9hy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 432F28158A; Mon, 25 May 2020 03:49:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA434801D8 for ; Mon, 25 May 2020 03:49:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id j2so16092705ilr.5 for ; Sun, 24 May 2020 18:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G1G2yN7CH6mwZowFRLCl3N052lzs4IPNmfKb916UET4=; b=XhLxv9hye5TLeHUyJTvm15gNKhwE8CJ4C+kQWb/iAEkMydZUWn3EOzrP+JpMhUM2XS 3zUJw80EZafRR/yvi+Wenp1lTXYlg0ReQZBQQOpT4R7LTBPvIiRTZ/DfoVMJpOwXwclh g/7kiM6zzDLPLGwM5JBY4A1S9Ym5glfM5LHv8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G1G2yN7CH6mwZowFRLCl3N052lzs4IPNmfKb916UET4=; b=DwRhh7yhb1ECNgkMqzTBrt+TzScDrVfB8oDboHGLTafVTrlkGlITjpKyDbxGwFwczh cH9kCwYDSR+qPZmJTcqvD0HOgtkr6umBvM8h9R1TcUMikt9+Di7NxVOXQ6aDqvyPJQvq EUV++zFQMXTsuQfTZ2UzE4udln7KF3jkP0sXrWEtOy47ciyfOj3JPTVhjj7LtAwso69o /zq7Sq8CNdF1BuEI0wNuSrUaYuw+gSMyp54Hc8k/0oAu80RWF28O984gCKkFNeU3UD87 HTKaV47AHovwUOGMPqh6gD2hh+1Wd3NWfcDbhbsCTWuR1VpCcGz3weffmpTwVPV2TVi8 o4gg== X-Gm-Message-State: AOAM533OXPCYFTc4SB0dDfpBwxjw+lLkv257ZfBUD0NSNXHybE16mHtp cOctLfz5QZ28l11nZIBeSqt9dKzaPWeDgQ== X-Google-Smtp-Source: ABdhPJzZFmZyiFmR8oIqDV5wQQFkCFvw++gdHXq2Vm9DGjpLG7x8kWXU0p0yOaF6cppc9JGlRh004A== X-Received: by 2002:a92:d40f:: with SMTP id q15mr20812164ilm.97.1590371353573; Sun, 24 May 2020 18:49:13 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id s7sm6822965ioc.37.2020.05.24.18.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 18:49:13 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 07/26] video: Drop unnecessary #ifdef around vid_console_color() Date: Sun, 24 May 2020 19:48:44 -0600 Message-Id: <20200524194852.v2.7.I077675d6a9b88621e29511331f0773f8bdaf5fc7@changeid> X-Mailer: git-send-email 2.27.0.rc0.183.gde8f92d652-goog In-Reply-To: <20200525014904.115621-1-sjg@chromium.org> References: <20200525014904.115621-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean All of the functions in this file only apply if DM_VIDEO is enabled. Drop the #ifdef as it just clutters things up. Add the needed forward declaration. Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin --- Changes in v2: None include/video_console.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/video_console.h b/include/video_console.h index 0936ceaaf1..d3bc063165 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -8,6 +8,8 @@ #include +struct video_priv; + #define VID_FRAC_DIV 256 #define VID_TO_PIXEL(x) ((x) / VID_FRAC_DIV) @@ -241,8 +243,6 @@ int vidconsole_put_string(struct udevice *dev, const char *str); void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row); -#ifdef CONFIG_DM_VIDEO - /** * vid_console_color() - convert a color code to a pixel's internal * representation @@ -257,5 +257,3 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col, u32 vid_console_color(struct video_priv *priv, unsigned int idx); #endif - -#endif