Skip to content

Commit 66db876

Browse files
committed
bus: firewall: Fix missing static inline annotations for stubs
Stubs in the header file for !CONFIG_STM32_FIREWALL case should be both static and inline, because they do not come with earlier declaration and should be inlined in every unit including the header. Cc: Patrice Chotard <[email protected]> Cc: [email protected] Fixes: 5c9668c ("firewall: introduce stm32_firewall framework") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 59e9910 commit 66db876

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

include/linux/bus/stm32_firewall_device.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,27 +114,30 @@ void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall, u32 su
114114

115115
#else /* CONFIG_STM32_FIREWALL */
116116

117-
int stm32_firewall_get_firewall(struct device_node *np, struct stm32_firewall *firewall,
118-
unsigned int nb_firewall)
117+
static inline int stm32_firewall_get_firewall(struct device_node *np,
118+
struct stm32_firewall *firewall,
119+
unsigned int nb_firewall)
119120
{
120121
return -ENODEV;
121122
}
122123

123-
int stm32_firewall_grant_access(struct stm32_firewall *firewall)
124+
static inline int stm32_firewall_grant_access(struct stm32_firewall *firewall)
124125
{
125126
return -ENODEV;
126127
}
127128

128-
void stm32_firewall_release_access(struct stm32_firewall *firewall)
129+
static inline void stm32_firewall_release_access(struct stm32_firewall *firewall)
129130
{
130131
}
131132

132-
int stm32_firewall_grant_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id)
133+
static inline int stm32_firewall_grant_access_by_id(struct stm32_firewall *firewall,
134+
u32 subsystem_id)
133135
{
134136
return -ENODEV;
135137
}
136138

137-
void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id)
139+
static inline void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall,
140+
u32 subsystem_id)
138141
{
139142
}
140143

0 commit comments

Comments
 (0)