mirror of https://github.com/thesofproject/sof.git
testbench: remove build warnings when building testbench.
A side effect of the pipeline splitting work means that testbench is not building. Provide a temporary fix until Zephyr native APIs are used. /component.c.o -c /home/lrg/work/sof/sof/src/audio/component.c /home/lrg/work/sof/sof/src/audio/component.c: In function ‘get_drv’: /home/lrg/work/sof/sof/src/audio/component.c:41:2: error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized] 41 | irq_local_disable(flags); | ^~~~~~~~~~~~~~~~~~~~~~~~ /home/lrg/work/sof/sof/src/audio/component.c: In function ‘comp_register’: /home/lrg/work/sof/sof/src/audio/component.c:150:2: error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized] 150 | irq_local_disable(flags); | ^~~~~~~~~~~~~~~~~~~~~~~~ /home/lrg/work/sof/sof/src/audio/component.c: In function ‘comp_unregister’: /home/lrg/work/sof/sof/src/audio/component.c:163:2: error: ‘flags’ is used uninitialized in this function [-Werror=uninitialized] 163 | irq_local_disable(flags); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
f0ecc7b68a
commit
6b39aded15
|
@ -169,6 +169,26 @@ static inline void interrupt_global_enable(uint32_t flags)
|
||||||
arch_interrupt_global_enable(flags);
|
arch_interrupt_global_enable(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_LIBRARY
|
||||||
|
|
||||||
|
/* temporary fix to remove build warning for testbench that will need shortly
|
||||||
|
* realigned when Zephyr native APIs are used.
|
||||||
|
*/
|
||||||
|
static inline void __irq_local_disable(unsigned long flags) {}
|
||||||
|
static inline void __irq_local_enable(unsigned long flags) {}
|
||||||
|
|
||||||
|
/* disables all IRQ sources on current core - NO effect on library */
|
||||||
|
#define irq_local_disable(flags) \
|
||||||
|
do { \
|
||||||
|
flags = 0; \
|
||||||
|
__irq_local_disable(flags); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* re-enables IRQ sources on current core - NO effect on library*/
|
||||||
|
#define irq_local_enable(flags) \
|
||||||
|
__irq_local_enable(flags)
|
||||||
|
|
||||||
|
#else
|
||||||
/* disables all IRQ sources on current core */
|
/* disables all IRQ sources on current core */
|
||||||
#define irq_local_disable(flags) \
|
#define irq_local_disable(flags) \
|
||||||
(flags = interrupt_global_disable())
|
(flags = interrupt_global_disable())
|
||||||
|
@ -177,4 +197,5 @@ static inline void interrupt_global_enable(uint32_t flags)
|
||||||
#define irq_local_enable(flags) \
|
#define irq_local_enable(flags) \
|
||||||
interrupt_global_enable(flags)
|
interrupt_global_enable(flags)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* __SOF_DRIVERS_INTERRUPT_H__ */
|
#endif /* __SOF_DRIVERS_INTERRUPT_H__ */
|
||||||
|
|
Loading…
Reference in New Issue