Skip to contentSkip to conversation

turris-omnia-mcu-interface.h: Move macro definitions outside of enums

PATCH Applied Marek Behún 2 participants 2 messages Dec 15, 2024 – Dec 17, 2024

Subsystems (2)
lore
Share & tools
lore

Marek Behún

author maintainer
#0 lore raw

PATCH 1/1 turris-omnia-mcu-interface.h: Move macro definitions outside of enums

Move the definitions of enumerator related macros outside of the enumerator definitions.

---
 include/linux/turris-omnia-mcu-interface.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/turris-omnia-mcu-interface.h +4 -2
index 06c94e032c6f..38b45ab00053 100644
@@ -241,16 +241,18 @@ enum omnia_int_e {
 
 enum omnia_cmd_led_mode_e {
 	OMNIA_CMD_LED_MODE_LED_MASK	= GENMASK(3, 0),
-#define OMNIA_CMD_LED_MODE_LED(_l)	FIELD_PREP(OMNIA_CMD_LED_MODE_LED_MASK, _l)
 	OMNIA_CMD_LED_MODE_USER		= BIT(4),
 };
 
+#define OMNIA_CMD_LED_MODE_LED(_l)	FIELD_PREP(OMNIA_CMD_LED_MODE_LED_MASK, _l)
+
 enum omnia_cmd_led_state_e {
 	OMNIA_CMD_LED_STATE_LED_MASK	= GENMASK(3, 0),
-#define OMNIA_CMD_LED_STATE_LED(_l)	FIELD_PREP(OMNIA_CMD_LED_STATE_LED_MASK, _l)
 	OMNIA_CMD_LED_STATE_ON		= BIT(4),
 };
 
+#define OMNIA_CMD_LED_STATE_LED(_l)	FIELD_PREP(OMNIA_CMD_LED_STATE_LED_MASK, _l)
+
 enum omnia_cmd_poweroff_e {
 	OMNIA_CMD_POWER_OFF_POWERON_BUTTON	= BIT(0),
 	OMNIA_CMD_POWER_OFF_MAGIC		= 0xdead,
Signature · 1 line
2.45.2
maintainer Applied
#1 lore raw

Re: (subset) [PATCH leds] turris-omnia-mcu-interface.h: Move macro definitions outside of enums

Quoted 4 lines · Marek Behún

Move the definitions of enumerator related macros outside of the enumerator definitions.

Applied, thanks!

[1/1] turris-omnia-mcu-interface.h: Move macro definitions outside of enums

      commit: 1c896113f04e34d0036ef506532d2e6cf77dd1e5

--
Lee Jones [李琼斯]