Skip to contentSkip to conversation

gpio: fix incorrect merge of linux/gpio/driver.h

PATCH In review Arnd Bergmann 3 participants 3 messages Sep 9, 2019 – Sep 10, 2019 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: fix incorrect merge of linux/gpio/driver.h

Two otherwise correct patches got merged incorrectly, which leads to build problems when CONFIG_GPIOLIB is disabled:

include/linux/gpio/driver.h:722:19: error: static declaration of 'gpiochip_lock_as_irq' follows non-static declaration static inline int gpiochip_lock_as_irq(struct gpio_chip *chip,

                  ^
include/linux/gpio/driver.h:706:5: note: previous declaration is here
int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
    ^
include/linux/gpio/driver.h:729:20: error: static declaration of 'gpiochip_unlock_as_irq' follows non-static declaration
static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip,
                   ^

include/linux/gpio/driver.h:707:6: note: previous declaration is here void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);

Fixes 8a6abcd04e4c ("Merge tag 'gpio-v5.4-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel")
Fixes 9091373ab7ea ("gpio: remove less important #ifdef around declarations")
Fixes c7663fa2a663 ("gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h")
---
 include/linux/gpio/driver.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/linux/gpio/driver.h +4 -4
index b74a3bee85e5..fb134ff20f6b 100644
@@ -702,14 +702,14 @@ void gpiochip_free_own_desc(struct gpio_desc *desc);
 void devprop_gpiochip_set_names(struct gpio_chip *chip,
 				const struct fwnode_handle *fwnode);
 
-/* lock/unlock as IRQ */
-int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
-void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);
-
 #ifdef CONFIG_GPIOLIB
 
 struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
 
+/* lock/unlock as IRQ */
+int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
+void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);
+
 #else /* CONFIG_GPIOLIB */
 
 static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
Signature · 1 line
2.20.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Arnd Bergmann

Two otherwise correct patches got merged incorrectly, which leads to build problems when CONFIG_GPIOLIB is disabled:

include/linux/gpio/driver.h:722:19: error: static declaration of 'gpiochip_lock_as_irq' follows non-static declaration static inline int gpiochip_lock_as_irq(struct gpio_chip *chip,

                  ^
include/linux/gpio/driver.h:706:5: note: previous declaration is here
int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
    ^
include/linux/gpio/driver.h:729:20: error: static declaration of 'gpiochip_unlock_as_irq' follows non-static declaration
static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip,
                   ^
Quoted 7 lines

include/linux/gpio/driver.h:707:6: note: previous declaration is here void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);

Fixes 8a6abcd04e4c ("Merge tag 'gpio-v5.4-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel")
Fixes 9091373ab7ea ("gpio: remove less important #ifdef around declarations")
Fixes c7663fa2a663 ("gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h")
#2 lore raw
In reply to Arnd Bergmann
Quoted 2 lines · Arnd Bergmann

Two otherwise correct patches got merged incorrectly, which leads to build problems when CONFIG_GPIOLIB is disabled:

This has actually been fixed in my for-next branch for days, the problem is that new next releases are not coming out currently because of kernel summit, so the fix is not turning up in next.

I have gotten something like 4 different fixes for this at this point :D

Yours,
Linus Walleij