Skip to contentSkip to conversation

small oddity in commit "power: reset: add driver for LinkStation power off"

PATCH New Daniel Golle 2 participants 3 messages Feb 18, 2021 System reset/shutdown drivers

lore
Share & tools
lore
#0 lore raw

Hi Daniel,

I stumbled upon a slight oddity in acommit you have contributed. Please see my comment below.

Quoted 27 lines

commit a7f79f99541eff4e6bcae0014eb08d3019337565

Author: Daniel González Cabanelas <[email protected]>
Date:   Wed Jul 15 15:35:14 2020 +0200

power: reset: add driver for LinkStation power off

Some Buffalo LinkStations perform the power off operation, at restart time, depending on the state of an output pin (LED2/INTn) at the ethernet PHY. This pin is also used to wake the machine when a WoL packet is received by the PHY.

The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU), and other models. Without it, the board remains forever halted if a power off command is executed, unless the PSU is disconnected and connected again.

Add the driver to provide the power off function and also make the WoL feature to be available.

...

drivers/power/reset/Makefile +0 -0
index 5710ca4695170..c51eceba9ea39 100644

drivers/power/reset/Makefile obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o · line 13

Quoted 4 lines
drivers/power/reset/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o
 obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
 obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
 obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
+obj-${CONFIG_POWER_RESET_LINKSTATION} += linkstation-poweroff.o

Why are you using curly brackets (ie. shell variable) here instead of normal parentheses (ie. Make variable)? It might work, but if there is no special reason for this, we should just be consistent with the rest of the file.

Cheers

Daniel

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#1 lore raw
Quoted 34 lines · Daniel Golle

Hi Daniel,

I stumbled upon a slight oddity in acommit you have contributed. Please see my comment below.

Quoted 28 lines

commit a7f79f99541eff4e6bcae0014eb08d3019337565

Author: Daniel González Cabanelas <[email protected]>
Date:   Wed Jul 15 15:35:14 2020 +0200

power: reset: add driver for LinkStation power off

Some Buffalo LinkStations perform the power off operation, at restart time, depending on the state of an output pin (LED2/INTn) at the ethernet PHY. This pin is also used to wake the machine when a WoL packet is received by the PHY.

The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU), and other models. Without it, the board remains forever halted if a power off command is executed, unless the PSU is disconnected and connected again.

Add the driver to provide the power off function and also make the WoL feature to be available.

...

drivers/power/reset/Makefile +0 -0
index 5710ca4695170..c51eceba9ea39 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o
 obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
Quoted 8 lines

drivers/power/reset/Makefile obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o · line 13

Quoted 3 lines
drivers/power/reset/Makefile +1 -0
 obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
 obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
+obj-${CONFIG_POWER_RESET_LINKSTATION} += linkstation-poweroff.o

Why are you using curly brackets (ie. shell variable) here instead of normal parentheses (ie. Make variable)? It might work, but if there is no special reason for this, we should just be consistent with the rest of the file.

Hi Daniel. Indeed there is no reason to use curly brackets.

I have no idea why I commited this small mistake, probably I need to graduate my glasses. Feel free to send a patch to fix it.

Thank you
Daniel

Quoted 6 lines

Cheers

Daniel

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw

PATCH 1/1 power: reset: replace curly brackets in Makefile

Normal parentheses should be used when referring to config variables in Makefile. Replace the accidentally introduced curly brackets by regular parentheses.

Fixes a7f79f99541ef ("power: reset: add driver for LinkStation power off")
---
 drivers/power/reset/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Makefile +1 -1
index 4f959b6976066..cf3f4d02d8a54 100644
@@ -11,7 +11,7 @@ obj-$(CONFIG_POWER_RESET_GEMINI_POWEROFF) += gemini-poweroff.o
 obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
 obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
 obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
-obj-${CONFIG_POWER_RESET_LINKSTATION} += linkstation-poweroff.o
+obj-$(CONFIG_POWER_RESET_LINKSTATION) += linkstation-poweroff.o
 obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o
 obj-$(CONFIG_POWER_RESET_MT6323) += mt6323-poweroff.o
 obj-$(CONFIG_POWER_RESET_OXNAS) += oxnas-restart.o
Signature · 7 lines
2.30.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel