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

Configure Feed

Select the types of activity you want to include in your feed.

soc: ti: pruss: Fix pruss APIs

PRUSS APIs in pruss_driver.h produce lots of compilation errors when
CONFIG_TI_PRUSS is not set.

The errors and warnings,
warning: returning 'void *' from a function with return type 'int' makes
integer from pointer without a cast [-Wint-conversion]
error: expected identifier or '(' before '{' token

Fix these warnings and errors by fixing the return type of pruss APIs as
well as removing the misplaced semicolon from pruss_cfg_xfr_enable()

Fixes: 0211cc1e4fbb ("soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR")
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20241220100508.1554309-2-danishanwar@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>

authored by

MD Danish Anwar and committed by
Nishanth Menon
202580b6 40384c84

+6 -6
+6 -6
include/linux/pruss_driver.h
··· 144 static inline int pruss_cfg_get_gpmux(struct pruss *pruss, 145 enum pruss_pru_id pru_id, u8 *mux) 146 { 147 - return ERR_PTR(-EOPNOTSUPP); 148 } 149 150 static inline int pruss_cfg_set_gpmux(struct pruss *pruss, 151 enum pruss_pru_id pru_id, u8 mux) 152 { 153 - return ERR_PTR(-EOPNOTSUPP); 154 } 155 156 static inline int pruss_cfg_gpimode(struct pruss *pruss, 157 enum pruss_pru_id pru_id, 158 enum pruss_gpi_mode mode) 159 { 160 - return ERR_PTR(-EOPNOTSUPP); 161 } 162 163 static inline int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable) 164 { 165 - return ERR_PTR(-EOPNOTSUPP); 166 } 167 168 static inline int pruss_cfg_xfr_enable(struct pruss *pruss, 169 enum pru_type pru_type, 170 - bool enable); 171 { 172 - return ERR_PTR(-EOPNOTSUPP); 173 } 174 175 #endif /* CONFIG_TI_PRUSS */
··· 144 static inline int pruss_cfg_get_gpmux(struct pruss *pruss, 145 enum pruss_pru_id pru_id, u8 *mux) 146 { 147 + return -EOPNOTSUPP; 148 } 149 150 static inline int pruss_cfg_set_gpmux(struct pruss *pruss, 151 enum pruss_pru_id pru_id, u8 mux) 152 { 153 + return -EOPNOTSUPP; 154 } 155 156 static inline int pruss_cfg_gpimode(struct pruss *pruss, 157 enum pruss_pru_id pru_id, 158 enum pruss_gpi_mode mode) 159 { 160 + return -EOPNOTSUPP; 161 } 162 163 static inline int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable) 164 { 165 + return -EOPNOTSUPP; 166 } 167 168 static inline int pruss_cfg_xfr_enable(struct pruss *pruss, 169 enum pru_type pru_type, 170 + bool enable) 171 { 172 + return -EOPNOTSUPP; 173 } 174 175 #endif /* CONFIG_TI_PRUSS */