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