Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2569076lqp; Mon, 25 Mar 2024 03:00:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4FidgXV+nRIckfVW9C8QAl67rALFKrxok6yL4q7b8YteXXq4ddMhbmhli7K0nLfDElQBZ6ITZLVP6qSNB9UrehmaAng63bJPhdpgL8A== X-Google-Smtp-Source: AGHT+IGZdO1mp7kqpn+el0C4SvJuiBxwLIzp8voul9MENZNU1h7ZPOHt9OVXr5qpiCkssfDjjKOD X-Received: by 2002:a05:6a00:4f8e:b0:6e5:cd5c:620a with SMTP id ld14-20020a056a004f8e00b006e5cd5c620amr6884387pfb.16.1711360814383; Mon, 25 Mar 2024 03:00:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711360814; cv=pass; d=google.com; s=arc-20160816; b=YSWlKTE16SiFHLteGGu9Ptyp+Gwk3cU428A4ZYKPq7dndNKByNCaItibo6G9Erx3Dv Ay5a/I3Aio10eAwY3y3wxyZnov0AorCkBBLerWFpBSWLMhnjfsAwAHAxHArv9a5usEbZ P8PHNqcnSDldRCSUzVBzVDgKyy7NbQgkCk/NOQD3aCtSqoCb+nff9/Efo2BeClAJ4ity OCbxCLdZi+XpSUOj0+JbyFaVpSMJrDWosmrixcmusiYzOxK/ZpsSRzSfLfWjNIqU4QPE Ynftjy5shfh3I/y9MPVPL96baWu5QeU1JyJ0s/c3PE1XA+CtxPhRC0MCUCNckPNj5Hzf siXg== 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=LsqO4Gpow6qDm37BOvKMnNBAEDdvasBLnA+xkh59WpOG/gl/Axc2cdECpZ+/TRk7am 8R1m+xAGQ96CeQDtyMu0bZSFHMs2xwh+5t7tRnCMNLWbF8/chk6BQOBMnZFmyBr7jPcw txS3yNYo58DTPXRCr3Z7RxSUpXQaDFX9ECdgi0igZyHiKmsMkWw4hjjKehNS1ncgCUF2 O7tsi1czGzKPhBIlwSzXJOXojEt3iwJvuFpFA2wDg5FwwBm+SiVT7AWZ2AmPa80hcKc2 RabNwwclGTiax0IAXqU29IN/KiwFue52C4Ur9wq+yvICuEP7khXJzLHMj5QW21ACWxpJ S7mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uAMRHNAe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u6-20020a62ed06000000b006e8f569a4bcsi4896081pfh.63.2024.03.25.03.00.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:00:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uAMRHNAe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115973-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E06A2A1E5C for ; Mon, 25 Mar 2024 09:56:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3E80395127; Mon, 25 Mar 2024 03:04:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uAMRHNAe" 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 D836D15E1EE; Sun, 24 Mar 2024 23:17:40 +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=1711322261; cv=none; b=IaIbrBRTXvubWJthlK2vTamaSRihZQoGBP6z1KvTQdjSnxgXyUBlN7OI+t77MM5SdW15VUfhHuI1+NAgv+6U6KtJgRFyUXAjk7QMVa/B6sndWLi3lRuT0klk+HkjZoxfjigb7L1zoVteuoY2AjZ5rFZKlIcGYGWbatz1C2DjN4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322261; c=relaxed/simple; bh=iS69dq/pd8SlrD01dtvfdyyqdoXawocA1V9Wz7B0cRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ksfndpZgdNV/ECxbVcmC/ZD87YLaHiwH2mQ/rtsJ6XODQSdDS6r1B7Xi0xcwL4lYCPsDDuxGd8FFBUX/OyEuBwAtosTDRZN9rlo/OQ9GsVJTv7sf8L3EytqoGiPheTyYTrD/D0a2Grcs1ftAnr2WIiYSytB3b+eii6RjMZEBpaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uAMRHNAe; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09CC9C4166C; Sun, 24 Mar 2024 23:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322260; bh=iS69dq/pd8SlrD01dtvfdyyqdoXawocA1V9Wz7B0cRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uAMRHNAefvPsRJTQYWty303aMNouC0m/9ots7M0Gj3hZdaheNlAourFJyF4wOwsOr j1TC3vu1zdZhY58AHtTkf6kDOXY4y4sKOYgzqzWgBXKTCUIcQhNrf5GjfsjvyxbwJj yFkoWjILSb4+DWaYbG2/BQ2DUK5zUTX8jrFqn5pVc+uoKDTVotYqGz4o6EiOllRx3r 2Rv2sZojeR8+vJf37yVvS0t+27VAcah0UaB09NomOjfqWDB+MOI/DEQOsuj1b2sRLy odIWqShznPrG5Bjq+WnYu6ZTaejrsCAF9oSUNrS3KTbX1L0u0ilhnhmBb/61niuC6r n0Gkix+HveJUA== 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.1 343/451] arch/powerpc: Remove from backlight code Date: Sun, 24 Mar 2024 19:10:19 -0400 Message-ID: <20240324231207.1351418-344-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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