Commit 04ffa4ed authored by Etienne Carriere's avatar Etienne Carriere Committed by Anas Nashif
Browse files

drivers: clock_control: remove inline attributes in stm32 clock drivers



Remove the inline attribute from stm32 clock drivers functions
especially for functions that are only referenced in the clock API
operation structure and therefore cannot be inline. As a generic
comment, today compiler are smart enough to optimize embedded software
without needing inline function attributes in the source files.

This change hopes that next stm32 clock driver will no more replicate
this bad habit when using existing source files as implementation
examples.

No functional change.

Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
parent dcf4855f
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -247,8 +247,7 @@ int enabled_clock(uint32_t src_clk)
	return r;
}

static inline int stm32_clock_control_on(const struct device *dev,
					 clock_control_subsys_t sub_system)
static int stm32_clock_control_on(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);
	volatile int temp;
@@ -271,8 +270,7 @@ static inline int stm32_clock_control_on(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_off(const struct device *dev,
					  clock_control_subsys_t sub_system)
static int stm32_clock_control_off(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

@@ -289,7 +287,7 @@ static inline int stm32_clock_control_off(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_configure(const struct device *dev,
static int stm32_clock_control_configure(const struct device *dev,
					 clock_control_subsys_t sub_system,
					 void *data)
{
+5 −7
Original line number Diff line number Diff line
@@ -144,8 +144,7 @@ int enabled_clock(uint32_t src_clk)
	return -ENOTSUP;
}

static inline int stm32_clock_control_on(const struct device *dev,
					 clock_control_subsys_t sub_system)
static int stm32_clock_control_on(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);
	volatile int temp;
@@ -166,8 +165,7 @@ static inline int stm32_clock_control_on(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_off(const struct device *dev,
					  clock_control_subsys_t sub_system)
static int stm32_clock_control_off(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

@@ -184,7 +182,7 @@ static inline int stm32_clock_control_off(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_configure(const struct device *dev,
static int stm32_clock_control_configure(const struct device *dev,
					 clock_control_subsys_t sub_system,
					 void *data)
{
+5 −7
Original line number Diff line number Diff line
@@ -382,8 +382,7 @@ int enabled_clock(uint32_t src_clk)
	return -ENOTSUP;
}

static inline int stm32_clock_control_on(const struct device *dev,
					 clock_control_subsys_t sub_system)
static int stm32_clock_control_on(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);
	volatile int temp;
@@ -409,8 +408,7 @@ static inline int stm32_clock_control_on(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_off(const struct device *dev,
					  clock_control_subsys_t sub_system)
static int stm32_clock_control_off(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

@@ -430,7 +428,7 @@ static inline int stm32_clock_control_off(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_configure(const struct device *dev,
static int stm32_clock_control_configure(const struct device *dev,
					 clock_control_subsys_t sub_system,
					 void *data)
{
+2 −4
Original line number Diff line number Diff line
@@ -14,8 +14,7 @@
/**
 * @brief fill in AHB/APB buses configuration structure
 */
static inline int stm32_clock_control_on(const struct device *dev,
					 clock_control_subsys_t sub_system)
static int stm32_clock_control_on(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

@@ -65,8 +64,7 @@ static inline int stm32_clock_control_on(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_off(const struct device *dev,
					  clock_control_subsys_t sub_system)
static int stm32_clock_control_off(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

+5 −7
Original line number Diff line number Diff line
@@ -191,8 +191,7 @@ static int enabled_clock(uint32_t src_clk)
	return -ENOTSUP;
}

static inline int stm32_clock_control_on(const struct device *dev,
					 clock_control_subsys_t sub_system)
static int stm32_clock_control_on(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

@@ -214,8 +213,7 @@ static inline int stm32_clock_control_on(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_off(const struct device *dev,
					  clock_control_subsys_t sub_system)
static int stm32_clock_control_off(const struct device *dev, clock_control_subsys_t sub_system)
{
	struct stm32_pclken *pclken = (struct stm32_pclken *)(sub_system);

@@ -237,7 +235,7 @@ static inline int stm32_clock_control_off(const struct device *dev,
	return 0;
}

static inline int stm32_clock_control_configure(const struct device *dev,
static int stm32_clock_control_configure(const struct device *dev,
					 clock_control_subsys_t sub_system,
					 void *data)
{
Loading