Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c5133f5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: atomisp: get rid of storage_class.h



Don't hide function declaration on ugly macros.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
parent 3708713f
Loading
Loading
Loading
Loading
+19 −20
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include <sp.h>
#include <type_support.h>
#include <math_support.h>
#include <storage_class.h>
#include <assert_support.h>
#include <platform_support.h>
#include "ia_css_circbuf_comm.h"
@@ -45,7 +44,7 @@ struct ia_css_circbuf_s {
 * @param elems	An array of elements.
 * @param desc	The descriptor set to the size using ia_css_circbuf_desc_init().
 */
STORAGE_CLASS_EXTERN void ia_css_circbuf_create(
extern void ia_css_circbuf_create(
	ia_css_circbuf_t *cb,
	ia_css_circbuf_elem_t *elems,
	ia_css_circbuf_desc_t *desc);
@@ -55,7 +54,7 @@ STORAGE_CLASS_EXTERN void ia_css_circbuf_create(
 *
 * @param cb The pointer to the circular buffer.
 */
STORAGE_CLASS_EXTERN void ia_css_circbuf_destroy(
extern void ia_css_circbuf_destroy(
		ia_css_circbuf_t *cb);

/**
@@ -68,7 +67,7 @@ STORAGE_CLASS_EXTERN void ia_css_circbuf_destroy(
 *
 * @return the pop-out value.
 */
STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_pop(
extern uint32_t ia_css_circbuf_pop(
		ia_css_circbuf_t *cb);

/**
@@ -82,7 +81,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_pop(
 *
 * @return the extracted value.
 */
STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_extract(
extern uint32_t ia_css_circbuf_extract(
	ia_css_circbuf_t *cb,
	int offset);

@@ -97,7 +96,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_extract(
 * @param elem The pointer to the element.
 * @param val  The value to be set.
 */
STORAGE_CLASS_INLINE void ia_css_circbuf_elem_set_val(
static inline void ia_css_circbuf_elem_set_val(
	ia_css_circbuf_elem_t *elem,
	uint32_t val)
{
@@ -111,7 +110,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_elem_set_val(
 *
 * @param elem The pointer to the element.
 */
STORAGE_CLASS_INLINE void ia_css_circbuf_elem_init(
static inline void ia_css_circbuf_elem_init(
		ia_css_circbuf_elem_t *elem)
{
	OP___assert(elem != NULL);
@@ -124,7 +123,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_elem_init(
 * @param src  The element as the copy source.
 * @param dest The element as the copy destination.
 */
STORAGE_CLASS_INLINE void ia_css_circbuf_elem_cpy(
static inline void ia_css_circbuf_elem_cpy(
	ia_css_circbuf_elem_t *src,
	ia_css_circbuf_elem_t *dest)
{
@@ -143,7 +142,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_elem_cpy(
 *
 * @return the position at offset.
 */
STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_get_pos_at_offset(
static inline uint8_t ia_css_circbuf_get_pos_at_offset(
	ia_css_circbuf_t *cb,
	uint32_t base,
	int offset)
@@ -176,7 +175,7 @@ STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_get_pos_at_offset(
 *
 * @return the offset.
 */
STORAGE_CLASS_INLINE int ia_css_circbuf_get_offset(
static inline int ia_css_circbuf_get_offset(
	ia_css_circbuf_t *cb,
	uint32_t src_pos,
	uint32_t dest_pos)
@@ -201,7 +200,7 @@ STORAGE_CLASS_INLINE int ia_css_circbuf_get_offset(
 *
 * TODO: Test this API.
 */
STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_size(
static inline uint32_t ia_css_circbuf_get_size(
		ia_css_circbuf_t *cb)
{
	OP___assert(cb != NULL);
@@ -217,7 +216,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_size(
 *
 * @return the number of available elements.
 */
STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_num_elems(
static inline uint32_t ia_css_circbuf_get_num_elems(
		ia_css_circbuf_t *cb)
{
	int num;
@@ -239,7 +238,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_num_elems(
 *	- true when it is empty.
 *	- false when it is not empty.
 */
STORAGE_CLASS_INLINE bool ia_css_circbuf_is_empty(
static inline bool ia_css_circbuf_is_empty(
		ia_css_circbuf_t *cb)
{
	OP___assert(cb != NULL);
@@ -257,7 +256,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_is_empty(
 *	- true when it is full.
 *	- false when it is not full.
 */
STORAGE_CLASS_INLINE bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb)
static inline bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb)
{
	OP___assert(cb != NULL);
	OP___assert(cb->desc != NULL);
@@ -274,7 +273,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb)
 * @param cb	The pointer to the circular buffer.
 * @param elem	The new element.
 */
STORAGE_CLASS_INLINE void ia_css_circbuf_write(
static inline void ia_css_circbuf_write(
	ia_css_circbuf_t *cb,
	ia_css_circbuf_elem_t elem)
{
@@ -298,7 +297,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_write(
 * @param cb	The pointer to the circular buffer.
 * @param val	The value to be pushed in.
 */
STORAGE_CLASS_INLINE void ia_css_circbuf_push(
static inline void ia_css_circbuf_push(
	ia_css_circbuf_t *cb,
	uint32_t val)
{
@@ -321,7 +320,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_push(
 *
 * @return: The number of free elements.
 */
STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_free_elems(
static inline uint32_t ia_css_circbuf_get_free_elems(
		ia_css_circbuf_t *cb)
{
	OP___assert(cb != NULL);
@@ -338,7 +337,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_get_free_elems(
 *
 * @return the elements value.
 */
STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek(
extern uint32_t ia_css_circbuf_peek(
	ia_css_circbuf_t *cb,
	int offset);

@@ -350,7 +349,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek(
 *
 * @return the elements value.
 */
STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek_from_start(
extern uint32_t ia_css_circbuf_peek_from_start(
	ia_css_circbuf_t *cb,
	int offset);

@@ -369,7 +368,7 @@ STORAGE_CLASS_EXTERN uint32_t ia_css_circbuf_peek_from_start(
 * @return	true on succesfully increasing the size
 * 			false on failure
 */
STORAGE_CLASS_EXTERN bool ia_css_circbuf_increase_size(
extern bool ia_css_circbuf_increase_size(
		ia_css_circbuf_t *cb,
		unsigned int sz_delta,
		ia_css_circbuf_elem_t *elems);
+7 −8
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@

#include <type_support.h>
#include <math_support.h>
#include <storage_class.h>
#include <platform_support.h>
#include <sp.h>
#include "ia_css_circbuf_comm.h"
@@ -35,7 +34,7 @@
 *	- true when it is empty.
 *	- false when it is not empty.
 */
STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_empty(
static inline bool ia_css_circbuf_desc_is_empty(
		ia_css_circbuf_desc_t *cb_desc)
{
	OP___assert(cb_desc != NULL);
@@ -52,7 +51,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_empty(
 *	- true when it is full.
 *	- false when it is not full.
 */
STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_full(
static inline bool ia_css_circbuf_desc_is_full(
		ia_css_circbuf_desc_t *cb_desc)
{
	OP___assert(cb_desc != NULL);
@@ -65,7 +64,7 @@ STORAGE_CLASS_INLINE bool ia_css_circbuf_desc_is_full(
 * @param cb_desc	The pointer circular buffer descriptor
 * @param size		The size of the circular buffer
 */
STORAGE_CLASS_INLINE void ia_css_circbuf_desc_init(
static inline void ia_css_circbuf_desc_init(
	ia_css_circbuf_desc_t *cb_desc,
	int8_t size)
{
@@ -82,7 +81,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_desc_init(
 *
 * @return the position in the circular buffer descriptor.
 */
STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_desc_get_pos_at_offset(
static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset(
	ia_css_circbuf_desc_t *cb_desc,
	uint32_t base,
	int offset)
@@ -114,7 +113,7 @@ STORAGE_CLASS_INLINE uint8_t ia_css_circbuf_desc_get_pos_at_offset(
 *
 * @return the offset.
 */
STORAGE_CLASS_INLINE int ia_css_circbuf_desc_get_offset(
static inline int ia_css_circbuf_desc_get_offset(
	ia_css_circbuf_desc_t *cb_desc,
	uint32_t src_pos,
	uint32_t dest_pos)
@@ -135,7 +134,7 @@ STORAGE_CLASS_INLINE int ia_css_circbuf_desc_get_offset(
 *
 * @return The number of available elements.
 */
STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_desc_get_num_elems(
static inline uint32_t ia_css_circbuf_desc_get_num_elems(
		ia_css_circbuf_desc_t *cb_desc)
{
	int num;
@@ -155,7 +154,7 @@ STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_desc_get_num_elems(
 *
 * @return: The number of free elements.
 */
STORAGE_CLASS_INLINE uint32_t ia_css_circbuf_desc_get_free_elems(
static inline uint32_t ia_css_circbuf_desc_get_free_elems(
		ia_css_circbuf_desc_t *cb_desc)
{
	uint32_t num;
+9 −9
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
 * @brief Get the csi rx fe state.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_state(
static inline void csi_rx_fe_ctrl_get_state(
		const csi_rx_frontend_ID_t ID,
		csi_rx_fe_ctrl_state_t *state)
{
@@ -73,7 +73,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_state(
 * @brief Get the state of the csi rx fe dlane process.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_dlane_state(
static inline void csi_rx_fe_ctrl_get_dlane_state(
		const csi_rx_frontend_ID_t ID,
		const uint32_t lane,
		csi_rx_fe_ctrl_lane_t *dlane_state)
@@ -89,7 +89,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_get_dlane_state(
 * @brief dump the csi rx fe state.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_dump_state(
static inline void csi_rx_fe_ctrl_dump_state(
		const csi_rx_frontend_ID_t ID,
		csi_rx_fe_ctrl_state_t *state)
{
@@ -118,7 +118,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_dump_state(
 * @brief Get the csi rx be state.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_get_state(
static inline void csi_rx_be_ctrl_get_state(
		const csi_rx_backend_ID_t ID,
		csi_rx_be_ctrl_state_t *state)
{
@@ -181,7 +181,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_get_state(
 * @brief Dump the csi rx be state.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_dump_state(
static inline void csi_rx_be_ctrl_dump_state(
		const csi_rx_backend_ID_t ID,
		csi_rx_be_ctrl_state_t *state)
{
@@ -225,7 +225,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_dump_state(
 * @brief Load the register value.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_fe_ctrl_reg_load(
static inline hrt_data csi_rx_fe_ctrl_reg_load(
	const csi_rx_frontend_ID_t ID,
	const hrt_address reg)
{
@@ -239,7 +239,7 @@ STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_fe_ctrl_reg_load(
 * @brief Store a value to the register.
 * Refer to "ibuf_ctrl_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_reg_store(
static inline void csi_rx_fe_ctrl_reg_store(
	const csi_rx_frontend_ID_t ID,
	const hrt_address reg,
	const hrt_data value)
@@ -253,7 +253,7 @@ STORAGE_CLASS_CSI_RX_C void csi_rx_fe_ctrl_reg_store(
 * @brief Load the register value.
 * Refer to "csi_rx_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_be_ctrl_reg_load(
static inline hrt_data csi_rx_be_ctrl_reg_load(
	const csi_rx_backend_ID_t ID,
	const hrt_address reg)
{
@@ -267,7 +267,7 @@ STORAGE_CLASS_CSI_RX_C hrt_data csi_rx_be_ctrl_reg_load(
 * @brief Store a value to the register.
 * Refer to "ibuf_ctrl_public.h" for details.
 */
STORAGE_CLASS_CSI_RX_C void csi_rx_be_ctrl_reg_store(
static inline void csi_rx_be_ctrl_reg_store(
	const csi_rx_backend_ID_t ID,
	const hrt_address reg,
	const hrt_data value)
+4 −4
Original line number Diff line number Diff line
@@ -38,12 +38,12 @@ STORAGE_CLASS_FIFO_MONITOR_DATA unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH] = {
#include "fifo_monitor_private.h"
#endif /* __INLINE_FIFO_MONITOR__ */

STORAGE_CLASS_INLINE bool fifo_monitor_status_valid (
static inline bool fifo_monitor_status_valid (
	const fifo_monitor_ID_t		ID,
	const unsigned int			reg,
	const unsigned int			port_id);

STORAGE_CLASS_INLINE bool fifo_monitor_status_accept(
static inline bool fifo_monitor_status_accept(
	const fifo_monitor_ID_t		ID,
	const unsigned int			reg,
	const unsigned int			port_id);
@@ -546,7 +546,7 @@ void fifo_monitor_get_state(
	return;
}

STORAGE_CLASS_INLINE bool fifo_monitor_status_valid (
static inline bool fifo_monitor_status_valid (
	const fifo_monitor_ID_t		ID,
	const unsigned int			reg,
	const unsigned int			port_id)
@@ -556,7 +556,7 @@ STORAGE_CLASS_INLINE bool fifo_monitor_status_valid (
	return (data >> (((port_id * 2) + _hive_str_mon_valid_offset))) & 0x1;
}

STORAGE_CLASS_INLINE bool fifo_monitor_status_accept(
static inline bool fifo_monitor_status_accept(
	const fifo_monitor_ID_t		ID,
	const unsigned int			reg,
	const unsigned int			port_id)
+4 −4
Original line number Diff line number Diff line
@@ -22,12 +22,12 @@
/*
 * Local function declarations
 */
STORAGE_CLASS_INLINE void gdc_reg_store(
static inline void gdc_reg_store(
	const gdc_ID_t		ID,
	const unsigned int	reg,
	const hrt_data		value);

STORAGE_CLASS_INLINE hrt_data gdc_reg_load(
static inline hrt_data gdc_reg_load(
	const gdc_ID_t		ID,
	const unsigned int	reg);

@@ -110,7 +110,7 @@ int gdc_get_unity(
/*
 * Local function implementations
 */
STORAGE_CLASS_INLINE void gdc_reg_store(
static inline void gdc_reg_store(
	const gdc_ID_t		ID,
	const unsigned int	reg,
	const hrt_data		value)
@@ -119,7 +119,7 @@ STORAGE_CLASS_INLINE void gdc_reg_store(
	return;
}

STORAGE_CLASS_INLINE hrt_data gdc_reg_load(
static inline hrt_data gdc_reg_load(
	const gdc_ID_t		ID,
	const unsigned int	reg)
{
Loading