Skip to contentSkip to conversation

gpio: thunderx: Don't directly include asm-generic/msi.h

PATCH In review Marc Zyngier 2 participants 4 messages Jul 11, 2022 – Jul 12, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: thunderx: Don't directly include asm-generic/msi.h

On architectures that require it, asm-generic/msi.h is already dragged in by the higher level include files, and is commonly refered to as 'asm/msi.h'.

It is also architecture specific, and breaks compilation in a pretty bad way now that linux/gpio/driver.h includes asm/msi.h (which drags a conflicting but nonetheless correct version of msi_alloc_info_t on x86).

Fixes 91a29af413de ("gpio: Remove dynamic allocation from populate_parent_alloc_arg()")
Cc Bartosz Golaszewski <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/gpio/gpio-thunderx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-thunderx.c +0 -2
index e1dedbca0c85..cc62c6e64103 100644
@@ -15,8 +15,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
-#include <asm-generic/msi.h>
-
 
 #define GPIO_RX_DAT	0x0
 #define GPIO_TX_SET	0x8
Signature · 1 line
2.34.1
#1 lore raw
Quoted 34 lines · Marc Zyngier

On architectures that require it, asm-generic/msi.h is already dragged in by the higher level include files, and is commonly refered to as 'asm/msi.h'.

It is also architecture specific, and breaks compilation in a pretty bad way now that linux/gpio/driver.h includes asm/msi.h (which drags a conflicting but nonetheless correct version of msi_alloc_info_t on x86).

Fixes 91a29af413de ("gpio: Remove dynamic allocation from populate_parent_alloc_arg()")
Cc Bartosz Golaszewski <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/gpio/gpio-thunderx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-thunderx.c +0 -3
index e1dedbca0c85..cc62c6e64103 100644
@@ -15,8 +15,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
-#include <asm-generic/msi.h>
-
 
 #define GPIO_RX_DAT    0x0
 #define GPIO_TX_SET    0x8
--
Quoted 2 lines

2.34.1

Applied for fixes, thanks!

Bart

#2 lore raw
Quoted 32 lines · Bartosz Golaszewski
Quoted 31 lines · Marc Zyngier

On architectures that require it, asm-generic/msi.h is already dragged in by the higher level include files, and is commonly refered to as 'asm/msi.h'.

It is also architecture specific, and breaks compilation in a pretty bad way now that linux/gpio/driver.h includes asm/msi.h (which drags a conflicting but nonetheless correct version of msi_alloc_info_t on x86).

Fixes 91a29af413de ("gpio: Remove dynamic allocation from populate_parent_alloc_arg()")
Cc Bartosz Golaszewski <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/gpio/gpio-thunderx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-thunderx.c +0 -2
index e1dedbca0c85..cc62c6e64103 100644
@@ -15,8 +15,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
-#include <asm-generic/msi.h>
-
 
Quoted 7 lines
Quoted 5 lines
drivers/gpio/gpio-thunderx.c +0 -1
 #define GPIO_RX_DAT    0x0
 #define GPIO_TX_SET    0x8
--

2.34.1

Applied for fixes, thanks!

I'm not sure this is correct on its own without the original patch mentioned in the Fixes: tag...

Thanks,

        M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#3 lore raw
Quoted 45 lines · Marc Zyngier
Quoted 35 lines · Bartosz Golaszewski
Quoted 34 lines · Marc Zyngier

On architectures that require it, asm-generic/msi.h is already dragged in by the higher level include files, and is commonly refered to as 'asm/msi.h'.

It is also architecture specific, and breaks compilation in a pretty bad way now that linux/gpio/driver.h includes asm/msi.h (which drags a conflicting but nonetheless correct version of msi_alloc_info_t on x86).

Link:
https://lore.kernel.org/r/[email protected]

Fixes 91a29af413de ("gpio: Remove dynamic allocation from

populate_parent_alloc_arg()")
Cc: Bartosz Golaszewski <[email protected]>
Cc: Linus Walleij <[email protected]>

---
 drivers/gpio/gpio-thunderx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-thunderx.c +0 -2
index e1dedbca0c85..cc62c6e64103 100644
@@ -15,8 +15,6 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
-#include <asm-generic/msi.h>
-
 
Quoted 7 lines
Quoted 5 lines
drivers/gpio/gpio-thunderx.c +0 -1
 #define GPIO_RX_DAT    0x0
 #define GPIO_TX_SET    0x8
--

2.34.1

Applied for fixes, thanks!

Quoted 3 lines

I'm not sure this is correct on its own without the original patch mentioned in the Fixes: tag...

Fair enough, in that case backing it out and: