From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CF3CC54798 for ; Tue, 5 Mar 2024 09:16:26 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=WmsBxzaD; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TpqgY11cWz3vXm for ; Tue, 5 Mar 2024 20:16:25 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=WmsBxzaD; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=intel.com (client-ip=192.198.163.9; helo=mgamail.intel.com; envelope-from=jani.nikula@intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Tpqff0tGdz3dTx for ; Tue, 5 Mar 2024 20:15:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709630138; x=1741166138; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=hMKs0ciZCs4Sa96j2l4fRH7HRRb+NS8yKx3L+577Xis=; b=WmsBxzaDGbFoDmCIT2r1GZNiJjsN+TIEzfUPI844k1sNkHWOukt80IhZ hURxFPYPIUM5gBn7BEt3ZNORbAjeLF3GUuBK1sxYBKvPgEAk30R7zErRG gw2RoDZXssf++19tfnJU6QaL3DcI4IP1F3ILxIVSlSojhye7TwpDmv7VE oqTQPTqkOCyCUGkRGwtsjeuqMQMCAYVqfylG7VoBGIU3L3mVW1bwOCLE+ 2xFpFSzEsCDoZehSGNQBMJIQ21sJIlkhwS+2hdIzxcUcvCx9byHX8iXs6 2iLGSnTCZaT1ukZ450pUlq4knzpu5keghCBfEnF46x73TpxPfo3bRAmnY w==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="14885908" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="14885908" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 01:15:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="9724146" Received: from omakhlou-mobl4.amr.corp.intel.com (HELO localhost) ([10.252.51.143]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 01:15:30 -0800 From: Jani Nikula To: Thomas Zimmermann , mpe@ellerman.id.au, naresh.kamboju@linaro.org, deller@gmx.de, npiggin@gmail.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com Subject: Re: [PATCH v2 3/3] arch/powerpc: Remove from backlight code In-Reply-To: <20240305090910.26742-4-tzimmermann@suse.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20240305090910.26742-1-tzimmermann@suse.de> <20240305090910.26742-4-tzimmermann@suse.de> Date: Tue, 05 Mar 2024 11:15:27 +0200 Message-ID: <87msrd2g5s.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, lkft-triage@lists.linaro.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 05 Mar 2024, Thomas Zimmermann wrote: > Replace with a forward declaration in to > resolves an unnecessary dependency. Remove pmac_backlight_curve_lookup() *resolve > and struct fb_info from source and header files. The function and the > framebuffer struct is unused. No functional changes. *are Reviewed-by: Jani Nikula > > Signed-off-by: Thomas Zimmermann > --- > 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)) -- Jani Nikula, Intel