From patchwork Tue Apr 28 21:30:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 185816 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp6322043ilf; Tue, 28 Apr 2020 14:31:28 -0700 (PDT) X-Google-Smtp-Source: APiQypLP6f3PUIr+9DFbIGqD4G41t0Dgcg1PJNoNuTlI6W/TsGAfPahFQc+CvghD4M6X95ztD7SV X-Received: by 2002:a17:902:b945:: with SMTP id h5mr30754895pls.224.1588109487955; Tue, 28 Apr 2020 14:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588109487; cv=none; d=google.com; s=arc-20160816; b=ngY2QQs6l5zaKME3TUgjIZntGNhiIEwfti4EzeIQgky1E16VGeb/7kQPdzdzJMgOhk 6K/1x4mbCwm6rPjV+mCOYIBIsNrwZAgsk/h4h52ZDsWc3exknrjVEVlFN2vvsqM61Lr/ mvC9Qu9wmiLkxu5sqg3OkyPGccFYj3dE8mVzdMtxMM9lV/ueBWXKBgEFhcogokExzL/m DSUdY8ezJ3NEosj2xlxwBVDnIdgGl3zdqJfiJBRnfHwQcCtFHTmz0w8yC2IinRXS1Gqt JAKOgOjgDLQfLEoFjyS+3fy5k5yhpLafEqOoUWvRVnOXyA5nHdFfhCn38CeWyKjIVorg YH3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=9y7X8DcvceH7nqmmxihyI02NMuEHRMNpg98t8A93Nmw=; b=P407uutoJ4lpCUf9/Gy1cr58SZPeb8IX/KXL6GZkSYWzKH8IXH3HA7pnKobV0HL1Mx 1wsCVLAiqUtMCXZ5mWa6rXfh7IrgJiUiTMajKkLmieGCTVMYFnsnH2UZkVza99Iio/el E/nci3AB9mlYG43B/T3ksSG6GF2pvukmPuoCKB+bMDeY/9ctKt0HzJpb603+rKBppiL0 rPXakr2Yt3SGQJLuPr3IqSjzVTp7UfxRM8YixRuY5pdNwYCf/YTAOLGmHhmi1SESphW+ wxEp5cZXj6bldjhOOCoZItQqu5b9S31ZvJXanctIK02al9q18XcULJdx9tXoCjU5Bh2K j7mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j3si14370011pgk.544.2020.04.28.14.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 14:31:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) 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 959766E566; Tue, 28 Apr 2020 21:31:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33B396E566 for ; Tue, 28 Apr 2020 21:31:22 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M9WmQ-1jZ47l0nHo-005W2P; Tue, 28 Apr 2020 23:31:09 +0200 From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= Subject: [PATCH] drm/i915: avoid unused scale_user_to_hw() warning Date: Tue, 28 Apr 2020 23:30:50 +0200 Message-Id: <20200428213106.3139170-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:rYIYDMxCYWRB2eFt+r4bXR0ojs6VRf8cssYFP45eloPQBq3kk1D 38AbGpfXilhQ2jU3p6Hjd0QcD2HvV3U+BhpEpeAKZtbVB3ZQ/FfFecRn74a+7glEdjBtxhN mCtjym4QUZYwirc3/24PVfET6sA4U1JkY6ymVG2ainX3OdXVUT7FrO8C3wZUz7tT3mANQiP 1CtPuSaxk0HHZM5ZPj5zQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:DmNhM1LrliY=:AH8nBz5qg7//jHMk3FuG07 G0DALaFRg/496pj0R3g9B8yEMsUsm1tdew0yojIFSWwldeLPjnIe2HxZQpbKnCZOoOx9ZHuzP VyIxzhMRF4falqztsfZMGV2K2nwiwdKpNqgAb89X3dBU8BTm2rAzVSchElOWeGYtRNzFRYe6a E+xBgEmfmuVo0QRBbaqnPz/mx23ORxpfd7Sd2OBQkI4vCbK4Ro7vfe9fwf4R58epq22aDkehB RGZ9W2KHhN+K6H7dkDw1tkcemaqMsca0bLEKk+Ub7kdOMW6lyvSXH3Oe5aCJ4Defd05xZvXZ/ 4HpPa02O3JOQ/D8CfiXMPD+I4Qf9UZseb5GhKxsn6JXwkzJk97xC6vG6fFYL2mTM27BFGyv+R sfsA7RAmpWxQnhLbXXlVD1EfhNx3xNHdcB8wOR86EjTbHht3RSyDf6eIw16ni7s3SAtH7wQ8v DuUKrhJ7JhRQ4vCj1+ST6H6SzxhGWOoFviaQxWJcQrjGf2tUj+wGYXtBP6IDzpYFha8ccwcKs jLKSSqD7PiYYb9exeWgp+JTrQG6A5cRq7N30YoYRSYm+vmiR3UFlrDpSLNEoJh5ys3/hXDhh7 kb6N3jfYbxHKMq7TnEzc7n2Vja9dUpwFmTura/Qnq0cD3H06zTjCso1oDBOCa+Hn+qaqC9MUC OVPnc5G59IGUtsyj92V7FgODe+McbW+Wzs0Gtq6kNoJ4RDRfFQDAlW9b1xKjaEpqMuj6vxY4C fUhC3SJkzNA5JkCcsLeA2iHZfzp0JegX/dwe3DL3qz4oTTcqTvvBO8/awKE9ZVeB1aJGx7Tc5 F6TnuV/kM5UlOls0MI5A8To+exth+rpDd1PSg+Y9CcbNTAoUSE= 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: Arnd Bergmann , Jani Nikula , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Chris Wilson , Manasi Navare Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" After the function is no longer marked 'inline', there is now a new warning pointing out that the only caller is inside of an #ifdef: drivers/gpu/drm/i915/display/intel_panel.c:493:12: warning: 'scale_user_to_hw' defined but not used [-Wunused-function] 493 | static u32 scale_user_to_hw(struct intel_connector *connector, | ^~~~~~~~~~~~~~~~ Move the function itself into that #ifdef as well. Fixes: 81b55ef1f47b ("drm/i915: drop a bunch of superfluous inlines") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/display/intel_panel.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) -- 2.26.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c index 4279d2bf884a..92ed67e21c60 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.c +++ b/drivers/gpu/drm/i915/display/intel_panel.c @@ -489,16 +489,6 @@ static u32 scale(u32 source_val, return target_val; } -/* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */ -static u32 scale_user_to_hw(struct intel_connector *connector, - u32 user_level, u32 user_max) -{ - struct intel_panel *panel = &connector->panel; - - return scale(user_level, 0, user_max, - panel->backlight.min, panel->backlight.max); -} - /* Scale user_level in range [0..user_max] to [0..hw_max], clamping the result * to [hw_min..hw_max]. */ static u32 clamp_user_to_hw(struct intel_connector *connector, @@ -1255,6 +1245,16 @@ static u32 intel_panel_get_backlight(struct intel_connector *connector) return val; } +/* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */ +static u32 scale_user_to_hw(struct intel_connector *connector, + u32 user_level, u32 user_max) +{ + struct intel_panel *panel = &connector->panel; + + return scale(user_level, 0, user_max, + panel->backlight.min, panel->backlight.max); +} + /* set backlight brightness to level in range [0..max], scaling wrt hw min */ static void intel_panel_set_backlight(const struct drm_connector_state *conn_state, u32 user_level, u32 user_max)