lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e41eaaee52b57f279a47f68745bc79c6178daac9.camel@xry111.site>
Date: Tue, 03 Jun 2025 13:52:39 +0800
From: Xi Ruoyao <xry111@...111.site>
To: WANG Xuerui <kernel@...0n.name>, Huacai Chen <chenhuacai@...nel.org>, 
 Yao Zi <ziyao@...root.org>
Cc: Jianmin Lv <lvjianmin@...ngson.cn>, linux-kernel@...r.kernel.org, 
	loongarch@...ts.linux.dev, Mingcong Bai <jeffbai@...c.io>, Kexy Biscuit
	 <kexybiscuit@...c.io>
Subject: Re: [PATCH 2/2] platform/loongarch: laptop: Support backlight power
 control

On Tue, 2025-06-03 at 13:44 +0800, WANG Xuerui wrote:
> On 6/3/25 12:16, Huacai Chen wrote:
> > On Sat, May 31, 2025 at 7:39 PM Yao Zi <ziyao@...root.org> wrote:
> > > 
> > > loongson_laptop_turn_{on,off}_backlight() are designed for controlling
> > > power of the backlight, but they aren't really used in the driver
> > > previously.
> > > 
> > > Unify these two functions since they only differ in arguments passed to
> > > ACPI method, and wire up loongson_laptop_backlight_update() to update
> > > power state of the backlight as well. Tested on TongFang L860-T2 3A5000
> > > laptop.
> > > 
> > > Signed-off-by: Yao Zi <ziyao@...root.org>
> > > ---
> > >   drivers/platform/loongarch/loongson-laptop.c | 53 +++++++-------------
> > >   1 file changed, 19 insertions(+), 34 deletions(-)
> > > 
> > > [snip]
> > > 
> > > -int loongson_laptop_turn_on_backlight(void)
> > > -{
> > > -       int status;
> > > -       union acpi_object arg0 = { ACPI_TYPE_INTEGER };
> > > -       struct acpi_object_list args = { 1, &arg0 };
> > > -
> > > -       arg0.integer.value = 1;
> > > -       status = acpi_evaluate_object(NULL, "\\BLSW", &args, NULL);
> > > -       if (ACPI_FAILURE(status)) {
> > > -               pr_info("Loongson lvds error: 0x%x\n", status);
> > > -               return -ENODEV;
> > > -       }
> > > -
> > > -       return 0;
> > > -}
> > > -
> > > -int loongson_laptop_turn_off_backlight(void)
> > > -{
> > > -       int status;
> > > -       union acpi_object arg0 = { ACPI_TYPE_INTEGER };
> > > -       struct acpi_object_list args = { 1, &arg0 };
> > > -
> > > -       arg0.integer.value = 0;
> > > -       status = acpi_evaluate_object(NULL, "\\BLSW", &args, NULL);
> > > -       if (ACPI_FAILURE(status)) {
> > > -               pr_info("Loongson lvds error: 0x%x\n", status);
> > > -               return -ENODEV;
> > > -       }
> > > -
> > > -       return 0;
> > > -}
> > I prefer to keep them, in downstream kernels there are users of them,
> > I don't want to add them back if one day those users are upstream.
> 
> Then these symbols should be properly EXPORT_SYMBOL_GPL marked?

I guess those downstream works are kernel forks, not separated modules,
thus an export is not needed.

-- 
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ