diff mbox series

[v10,09/14] platform/x86: Rename alienware-wmi.c

Message ID 20250207154610.13675-10-kuurtb@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series platform/x86: alienware-wmi driver rework | expand

Commit Message

Kurt Borja Feb. 7, 2025, 3:46 p.m. UTC
Rename alienware-wmi to support upcoming split.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
 drivers/platform/x86/dell/Makefile                               | 1 +
 .../platform/x86/dell/{alienware-wmi.c => alienware-wmi-base.c}  | 0
 2 files changed, 1 insertion(+)
 rename drivers/platform/x86/dell/{alienware-wmi.c => alienware-wmi-base.c} (100%)

Comments

Andy Shevchenko Feb. 11, 2025, 4:41 p.m. UTC | #1
On Fri, Feb 07, 2025 at 10:46:05AM -0500, Kurt Borja wrote:
> Rename alienware-wmi to support upcoming split.

(the change that is caught by my eye and induced this review session)

...

>  obj-$(CONFIG_ALIENWARE_WMI)		+= alienware-wmi.o
> +alienware-wmi-objs			:= alienware-wmi-base.o

objs is incorrect! Please use correct y instead.

>  obj-$(CONFIG_DCDBAS)			+= dcdbas.o
>  obj-$(CONFIG_DELL_LAPTOP)		+= dell-laptop.o
>  obj-$(CONFIG_DELL_RBTN)			+= dell-rbtn.o
Kurt Borja Feb. 11, 2025, 5:31 p.m. UTC | #2
Hi Andy,

Thank you for your review!

On Tue Feb 11, 2025 at 11:41 AM -05, Andy Shevchenko wrote:
> On Fri, Feb 07, 2025 at 10:46:05AM -0500, Kurt Borja wrote:
>> Rename alienware-wmi to support upcoming split.
>
> (the change that is caught by my eye and induced this review session)
>
> ...
>
>>  obj-$(CONFIG_ALIENWARE_WMI)		+= alienware-wmi.o
>> +alienware-wmi-objs			:= alienware-wmi-base.o
>
> objs is incorrect! Please use correct y instead.

I want to understand what is exactly wrong here. This `objs` pattern is
used a lot in this file, so I just copied it. For example [1].

Is it wrong to do it here for a single file? Is it wrong to do it at
all?

My goal is to split the file, but link it all together in a single
module.

[1] https://elixir.bootlin.com/linux/v6.14-rc2/source/drivers/platform/x86/dell/Makefile#L14
Andy Shevchenko Feb. 11, 2025, 6:50 p.m. UTC | #3
On Tue, Feb 11, 2025 at 12:31:34PM -0500, Kurt Borja wrote:
> On Tue Feb 11, 2025 at 11:41 AM -05, Andy Shevchenko wrote:
> > On Fri, Feb 07, 2025 at 10:46:05AM -0500, Kurt Borja wrote:
> >> Rename alienware-wmi to support upcoming split.
> >
> > (the change that is caught by my eye and induced this review session)

...

> >>  obj-$(CONFIG_ALIENWARE_WMI)		+= alienware-wmi.o
> >> +alienware-wmi-objs			:= alienware-wmi-base.o
> >
> > objs is incorrect! Please use correct y instead.
> 
> I want to understand what is exactly wrong here. This `objs` pattern is
> used a lot in this file, so I just copied it. For example [1].

It doesn't mean it's a good pattern to copy.

> Is it wrong to do it here for a single file? Is it wrong to do it at
> all?

If the compilation unit is in-kernel unit (either built-in or a module) the -y
should be used, for the user space tools which are build inside the kernel the
-objs should be used. This all implied in the respective documentation.

> My goal is to split the file, but link it all together in a single
> module.
> 
> [1] https://elixir.bootlin.com/linux/v6.14-rc2/source/drivers/platform/x86/dell/Makefile#L14
diff mbox series

Patch

diff --git a/drivers/platform/x86/dell/Makefile b/drivers/platform/x86/dell/Makefile
index bb3cbd470a46..f8aec8502c2f 100644
--- a/drivers/platform/x86/dell/Makefile
+++ b/drivers/platform/x86/dell/Makefile
@@ -5,6 +5,7 @@ 
 #
 
 obj-$(CONFIG_ALIENWARE_WMI)		+= alienware-wmi.o
+alienware-wmi-objs			:= alienware-wmi-base.o
 obj-$(CONFIG_DCDBAS)			+= dcdbas.o
 obj-$(CONFIG_DELL_LAPTOP)		+= dell-laptop.o
 obj-$(CONFIG_DELL_RBTN)			+= dell-rbtn.o
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi-base.c
similarity index 100%
rename from drivers/platform/x86/dell/alienware-wmi.c
rename to drivers/platform/x86/dell/alienware-wmi-base.c