Skip to contentSkip to conversation

platform/surface: aggregator: Ouse y instead of objs in Makefile

PATCH Superseded Andy Shevchenko 2 participants 3 messages Aug 3, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/surface: aggregator: Ouse y instead of objs in Makefile

The 'objs' is for user space tools, for the kernel modules we should use 'y'.

---
 drivers/platform/surface/aggregator/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/platform/surface/aggregator/Makefile +6 -6
index c8498c41e758..ce548dba1d4b 100644
@@ -6,12 +6,12 @@ CFLAGS_core.o = -I$(src)
 
 obj-$(CONFIG_SURFACE_AGGREGATOR) += surface_aggregator.o
 
-surface_aggregator-objs := core.o
-surface_aggregator-objs += ssh_parser.o
-surface_aggregator-objs += ssh_packet_layer.o
-surface_aggregator-objs += ssh_request_layer.o
-surface_aggregator-objs += controller.o
+surface_aggregator-y := core.o
+surface_aggregator-y += ssh_parser.o
+surface_aggregator-y += ssh_packet_layer.o
+surface_aggregator-y += ssh_request_layer.o
+surface_aggregator-y += controller.o
 
 ifeq ($(CONFIG_SURFACE_AGGREGATOR_BUS),y)
-surface_aggregator-objs += bus.o
+surface_aggregator-y += bus.o
 endif
Signature · 1 line
2.30.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

The 'objs' is for user space tools, for the kernel modules we should use 'y'.

Thank you! I was previously not aware of that distinction. Two small notes:

- There is a typo in the subject line.
- With that change, the ifeq could be placed in-line (see note below).

All in all looks good to me (assuming the typo gets fixed).

Quoted 17 lines
---
  drivers/platform/surface/aggregator/Makefile | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
drivers/platform/surface/aggregator/Makefile +0 -5
index c8498c41e758..ce548dba1d4b 100644
@@ -6,12 +6,12 @@ CFLAGS_core.o = -I$(src)
 
  obj-$(CONFIG_SURFACE_AGGREGATOR) += surface_aggregator.o
 
-surface_aggregator-objs := core.o
-surface_aggregator-objs += ssh_parser.o
-surface_aggregator-objs += ssh_packet_layer.o
-surface_aggregator-objs += ssh_request_layer.o
-surface_aggregator-objs += controller.o

drivers/platform/surface/aggregator/Makefile CFLAGS_core.o = -I$(src) · line 17

Quoted 10 lines
drivers/platform/surface/aggregator/Makefile +6 -1
+surface_aggregator-y := core.o
+surface_aggregator-y += ssh_parser.o
+surface_aggregator-y += ssh_packet_layer.o
+surface_aggregator-y += ssh_request_layer.o
+surface_aggregator-y += controller.o
 
  ifeq ($(CONFIG_SURFACE_AGGREGATOR_BUS),y)
-surface_aggregator-objs += bus.o
+surface_aggregator-y += bus.o
  endif

I believe it should now be possible to write this as

    surface_aggregator-$(CONFIG_SURFACE_AGGREGATOR_BUS) += bus.o

which might be a bit cleaner. Don't have much of a preference though so I'd also be fine with keeping the ifeq.

Regards,
Max

#2 lore raw
Quoted 11 lines · Maximilian Luz
Quoted 4 lines · Andy Shevchenko

The 'objs' is for user space tools, for the kernel modules we should use 'y'.

Thank you! I was previously not aware of that distinction. Two small notes:

- There is a typo in the subject line.
- With that change, the ifeq could be placed in-line (see note below).

Will address both.

Quoted 3 lines

All in all looks good to me (assuming the typo gets fixed).

Thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko