2020-05-13 19:17:53

by Matej Dujava

[permalink] [raw]
Subject: [PATCH v3 2/2] staging: vt6655: vt6656: change order of makefile variable definitions

This patch will add indentation to multiline variable and put
obj-$(CONFIG_X) at the beginning of the file. This order of variables is
used in other drives, so this will make vt665x Makefiles fit into the
pattern.

Indentation is fixed in vt6655/Makefile.

Order of variable declaration is changed in vt6656/Makefile.

Signed-off-by: Matej Dujava <[email protected]>
---
v1: Initial patch
v2: This patch was split from original bigger patch
v3: Added more info about what and why it's removed

drivers/staging/vt6655/Makefile | 24 ++++++++++++------------
drivers/staging/vt6656/Makefile | 4 ++--
2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/vt6655/Makefile b/drivers/staging/vt6655/Makefile
index e70357ec0af8..eda08a1516ab 100644
--- a/drivers/staging/vt6655/Makefile
+++ b/drivers/staging/vt6655/Makefile
@@ -1,15 +1,15 @@
# SPDX-License-Identifier: GPL-2.0

-vt6655_stage-y += device_main.o \
- card.o \
- channel.o \
- mac.o \
- baseband.o \
- rxtx.o \
- dpc.o \
- power.o \
- srom.o \
- key.o \
- rf.o
-
obj-$(CONFIG_VT6655) += vt6655_stage.o
+
+vt6655_stage-y += device_main.o \
+ card.o \
+ channel.o \
+ mac.o \
+ baseband.o \
+ rxtx.o \
+ dpc.o \
+ power.o \
+ srom.o \
+ key.o \
+ rf.o
diff --git a/drivers/staging/vt6656/Makefile b/drivers/staging/vt6656/Makefile
index f696a9d7a143..aac323d6a684 100644
--- a/drivers/staging/vt6656/Makefile
+++ b/drivers/staging/vt6656/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0

+obj-$(CONFIG_VT6656) += vt6656_stage.o
+
vt6656_stage-y += main_usb.o \
card.o \
mac.o \
@@ -11,5 +13,3 @@ vt6656_stage-y += main_usb.o \
rf.o \
usbpipe.o \
channel.o
-
-obj-$(CONFIG_VT6656) += vt6656_stage.o
--
2.26.2


2020-05-15 13:51:42

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] staging: vt6655: vt6656: change order of makefile variable definitions

On Wed, May 13, 2020 at 09:15:51PM +0200, Matej Dujava wrote:
> This patch will add indentation to multiline variable and put
> obj-$(CONFIG_X) at the beginning of the file. This order of variables is
> used in other drives, so this will make vt665x Makefiles fit into the
> pattern.
>
> Indentation is fixed in vt6655/Makefile.
>
> Order of variable declaration is changed in vt6656/Makefile.
>
> Signed-off-by: Matej Dujava <[email protected]>
> ---
> v1: Initial patch
> v2: This patch was split from original bigger patch
> v3: Added more info about what and why it's removed
>
> drivers/staging/vt6655/Makefile | 24 ++++++++++++------------
> drivers/staging/vt6656/Makefile | 4 ++--
> 2 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/vt6655/Makefile b/drivers/staging/vt6655/Makefile
> index e70357ec0af8..eda08a1516ab 100644
> --- a/drivers/staging/vt6655/Makefile
> +++ b/drivers/staging/vt6655/Makefile
> @@ -1,15 +1,15 @@
> # SPDX-License-Identifier: GPL-2.0
>
> -vt6655_stage-y += device_main.o \
> - card.o \
> - channel.o \
> - mac.o \
> - baseband.o \
> - rxtx.o \
> - dpc.o \
> - power.o \
> - srom.o \
> - key.o \
> - rf.o
> -
> obj-$(CONFIG_VT6655) += vt6655_stage.o
> +
> +vt6655_stage-y += device_main.o \
> + card.o \
> + channel.o \
> + mac.o \
> + baseband.o \
> + rxtx.o \
> + dpc.o \
> + power.o \
> + srom.o \
> + key.o \
> + rf.o
> diff --git a/drivers/staging/vt6656/Makefile b/drivers/staging/vt6656/Makefile
> index f696a9d7a143..aac323d6a684 100644
> --- a/drivers/staging/vt6656/Makefile
> +++ b/drivers/staging/vt6656/Makefile
> @@ -1,5 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0
>
> +obj-$(CONFIG_VT6656) += vt6656_stage.o
> +
> vt6656_stage-y += main_usb.o \
> card.o \
> mac.o \
> @@ -11,5 +13,3 @@ vt6656_stage-y += main_usb.o \
> rf.o \
> usbpipe.o \
> channel.o
> -
> -obj-$(CONFIG_VT6656) += vt6656_stage.o

I still fail to understand the need for this patch at all. It doesn't
clean anything up, nor change anything. There is no rule that this has
to be in one order or the other, and in fact, I like the order that the
files currently have :)

thanks,

greg k-h

2020-05-15 14:57:27

by Matej Dujava

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] staging: vt6655: vt6656: change order of makefile variable definitions

On Fri, May 15, 2020 at 03:48:59PM +0200, Greg Kroah-Hartman wrote:
>I still fail to understand the need for this patch at all. It doesn't
>clean anything up, nor change anything. There is no rule that this has
>to be in one order or the other, and in fact, I like the order that the
>files currently have :)
>
>thanks,
>
>greg k-h

Most of makefiles has pattern that `obj-${}` is before `driver-y` lines.
If this is not something that was intentional, then this patch is not
adding any value indeed.

Few examples that give me that impression:

./gnss/Makefile-# SPDX-License-Identifier: GPL-2.0
./gnss/Makefile-#
./gnss/Makefile-# Makefile for the GNSS subsystem.
./gnss/Makefile-#
./gnss/Makefile-
./gnss/Makefile:obj-$(CONFIG_GNSS) += gnss.o
./gnss/Makefile-gnss-y := core.o
./gnss/Makefile-
./gnss/Makefile:obj-$(CONFIG_GNSS_SERIAL) += gnss-serial.o
./gnss/Makefile-gnss-serial-y := serial.o
--snip end--

./.../go7007/Makefile-# SPDX-License-Identifier: GPL-2.0
./.../go7007/Makefile:obj-$(CONFIG_VIDEO_GO7007) += go7007.o
./.../go7007/Makefile:obj-$(CONFIG_VIDEO_GO7007_USB) += go7007-usb.o
./.../go7007/Makefile:obj-$(CONFIG_VIDEO_GO7007_LOADER) += go7007-loader.o
./.../go7007/Makefile:obj-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD) += s2250.o
./.../go7007/Makefile-
./.../go7007/Makefile-go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.
./.../go7007/Makefile- snd-go7007.o
./.../go7007/Makefile-
./.../go7007/Makefile-s2250-y := s2250-board.o
--snip end--

Thanks,
Matej