Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <patrice.chotard@foss.st.com>
Cc: stable@vger.kernel.org
Fixes: 5c9668cfc6d7 ("firewall: introduce stm32_firewall framework")
Link: https://lore.kernel.org/r/20250507092121.95121-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

+9 -6
+9 -6
include/linux/bus/stm32_firewall_device.h
··· 114 114 115 115 #else /* CONFIG_STM32_FIREWALL */ 116 116 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) 119 120 { 120 121 return -ENODEV; 121 122 } 122 123 123 - int stm32_firewall_grant_access(struct stm32_firewall *firewall) 124 + static inline int stm32_firewall_grant_access(struct stm32_firewall *firewall) 124 125 { 125 126 return -ENODEV; 126 127 } 127 128 128 - void stm32_firewall_release_access(struct stm32_firewall *firewall) 129 + static inline void stm32_firewall_release_access(struct stm32_firewall *firewall) 129 130 { 130 131 } 131 132 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) 133 135 { 134 136 return -ENODEV; 135 137 } 136 138 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) 138 141 { 139 142 } 140 143