Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2398511lqp; Sun, 24 Mar 2024 17:47:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqdhkDmzKLPnn97LcTBS1kNrMJ5qbyEOFGnA1l8WQkWTtU71uhmJ9ie9UGMpKmu2D4UsMn41zrb4PKQyr4a5ATRi3Qky13y/z3330RYA== X-Google-Smtp-Source: AGHT+IG57Na0yYJloJ2ibLcatiVJ3f7a4dJCGkuXkesG0Ty1qFQTbyH1T8OC8pYkS7R16m3edbrF X-Received: by 2002:a17:90a:a085:b0:29e:5e:33bd with SMTP id r5-20020a17090aa08500b0029e005e33bdmr6967743pjp.21.1711327660792; Sun, 24 Mar 2024 17:47:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711327660; cv=pass; d=google.com; s=arc-20160816; b=eFReUfaUM4z70sO+huVnsME/69rAUykDx+ZkeIVbEE4ay0MeLH/mwrfX4vbqajrhNR GVb56LpzE9owDsauTEBR2xzqMZBLq7n5J/muu8rMhT9G39qURhvHpW3A8bf1gMweOrn6 fvXz0OFMjRetDJP11ugk3b/1LCBXQpggz7B2AzC5N7EM6yS2d/lMP64lTXGufVn+gPB4 Wq0IX/6TPEzkVun24DZUxL4GQO0s5YPDxoXHBbmY11RNegPALtNdQZH0lIyxFN6N9lhP LL2OL37rx1bcIUS//EELpOfETO1SAsilbIQFKFUPNb9s2LBj5Z2bQPvJuOegsGbXmpto fPYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=id+/c1nbfatJgBiJrukyDvX1dG4whnSWYzBRS9bXofI=; fh=fCrNhbGoVOU2HL6iJ5qBv/Gcah4n3KrnG7tDAR/KD5g=; b=bU9g6dZhVVW/60h2TXK8MLEx+m3KsI/2FWhL0PpzDzLQS1VvRuCM1/VNxgASxyJcmj wKx/zEl0ai9rMjs9/MHZogcwu8FcjBvy0i/BX1NHWkH7el4DNAMDtpUb/m+prPmSmhiD mqEbxrHuOebog5i9OEeVD1stdxRbDwB6vYr9p738Qo89M71g7bKPRbuFFfAFKwo5iHOl iiaKKoIfkYzRhYeS6UN7szoJiA3V7x2FD4LK/ZIT67k4m3Rch9kUkPUgdhMoZAZWTL9B Zp0TCLAfJE07hbdxnqQVViTdgj8Ymj7c2MZarTypKG7wk2I6k2HFUdQOmDzTRr40WVHk VD+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qwIZodAR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113420-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113420-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c2-20020a17090ab28200b0029bce872076si10066543pjr.58.2024.03.24.17.47.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:47:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113420-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qwIZodAR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113420-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113420-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D052EB255DA for ; Mon, 25 Mar 2024 00:32:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E8451A83F4; Sun, 24 Mar 2024 22:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qwIZodAR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32D0B1A83D5; Sun, 24 Mar 2024 22:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320222; cv=none; b=B8QPI7bUY/cQ1cCakTtyPF75Zd1sBPn2mIr/wVRdO2PVIpu/mt1Ob8oIAe4v5683NAv/e7ysjEzoUNjWLNdK2hrKjxHzHpV+NF85upiDFtbAtr/L3I6KeQkKF4KUbrW3oSeQ4v+OP32gsqeL7FKGT2z1J4fudUdt0gARxT1etBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320222; c=relaxed/simple; bh=iS69dq/pd8SlrD01dtvfdyyqdoXawocA1V9Wz7B0cRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u5q81hSSqwErkZVzNOUKtZLoadHGZu/mbIpV3QJKrs5a8jnT2feaUHBPWjZk+GOD/cpW9tv32rp3D1+ZUcuDZpb6YvSAEQc/7mlI78TDLAoc8dA/GZxNUBfiFZwZAz0SE5PBJUxgkTiDowLwtet56UODgDfIl0yobvb2I7pHJyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qwIZodAR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 134BAC43399; Sun, 24 Mar 2024 22:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320221; bh=iS69dq/pd8SlrD01dtvfdyyqdoXawocA1V9Wz7B0cRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qwIZodART1vjWlG4vdzUifCCVbPLY1EB+DADZkSYRYHem2VgmWnKpXziGtw/G8sKw 6cMJJkla8UcYJE3kMieihuCnTuY8xTyc13xc7dSe2U7uIxGaiI+b8QQB90r7tKY8Fu F1bF9GdhT/FhgHTZoEO7cRjrijdZGk3s5vBpNEUkGhUJx5TvkqAoWNgxLH2ycfCC4L QVhC5pW4TzW3KS6mkpPWFtoARDkY2zrlDMDCzjgmhTxx1Cg407In64JYFizyxKSEtJ pJNld7vhaabI9l3HVtYf1uOKwhLLtKsPidF2yfadXu3B8svkCcWDfrVv9nN5z7gLNw ozxXfNkolit/w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thomas Zimmermann , Jani Nikula , Michael Ellerman , Sasha Levin Subject: [PATCH 6.8 529/715] arch/powerpc: Remove from backlight code Date: Sun, 24 Mar 2024 18:31:48 -0400 Message-ID: <20240324223455.1342824-530-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Thomas Zimmermann [ Upstream commit 838f865802b9f26135ea7df4e30f89ac2f50c23e ] Replace with a forward declaration in to resolve an unnecessary dependency. Remove pmac_backlight_curve_lookup() and struct fb_info from source and header files. The function and the framebuffer struct are unused. No functional changes. v3: * Add Fixes tag (Christophe) * fix typos in commit message (Jani) Signed-off-by: Thomas Zimmermann Fixes: d565dd3b0824 ("[PATCH] powerpc: More via-pmu backlight fixes") Reviewed-by: Jani Nikula Acked-by: Michael Ellerman # (powerpc) Link: https://patchwork.freedesktop.org/patch/msgid/20240306122935.10626-4-tzimmermann@suse.de Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/backlight.h | 5 ++-- arch/powerpc/platforms/powermac/backlight.c | 26 --------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h index 1b5eab62ed047..061a910d74929 100644 --- a/arch/powerpc/include/asm/backlight.h +++ b/arch/powerpc/include/asm/backlight.h @@ -10,15 +10,14 @@ #define __ASM_POWERPC_BACKLIGHT_H #ifdef __KERNEL__ -#include #include +struct backlight_device; + /* For locking instructions, see the implementation file */ extern struct backlight_device *pmac_backlight; extern struct mutex pmac_backlight_mutex; -extern int pmac_backlight_curve_lookup(struct fb_info *info, int value); - extern int pmac_has_backlight_type(const char *type); extern void pmac_backlight_key(int direction); diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c index aeb79a8b3e109..12bc01353bd3c 100644 --- a/arch/powerpc/platforms/powermac/backlight.c +++ b/arch/powerpc/platforms/powermac/backlight.c @@ -9,7 +9,6 @@ */ #include -#include #include #include #include @@ -72,31 +71,6 @@ int pmac_has_backlight_type(const char *type) return 0; } -int pmac_backlight_curve_lookup(struct fb_info *info, int value) -{ - int level = (FB_BACKLIGHT_LEVELS - 1); - - if (info && info->bl_dev) { - int i, max = 0; - - /* Look for biggest value */ - for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) - max = max((int)info->bl_curve[i], max); - - /* Look for nearest value */ - for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) { - int diff = abs(info->bl_curve[i] - value); - if (diff < max) { - max = diff; - level = i; - } - } - - } - - return level; -} - static void pmac_backlight_key_worker(struct work_struct *work) { if (atomic_read(&kernel_backlight_disabled)) -- 2.43.0