mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-22 07:01:24 +02:00
sunxi: dram: make MBUS configuration functions static
The usage of the C keyword "inline" seems to be a common misunderstanding: it's a *hint* only, and modern compilers will inline (or not) functions based on their own judgement and provided compiler options. So while marking functions as "inline" does not do much, missing the "static" keyword will force to compiler to spell out a version of the function for potential external callers, which actually increases the code size (though hopefully the linker will drop the function). Change the "inline" attribute for the mbus_configure_port() functions in some Allwinner DRAM drivers to "static", so that the explicit version can actually be dropped from the object file, reducing the code size. "static inline" has a use case in header files, where it avoids a warning if a .c file including this header does not use the particular function. In a .c file itself "static inline" is not useful otherwise, so just use static here as well. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
This commit is contained in:
parent
6acc5fa581
commit
c9dd624a38
@ -93,7 +93,8 @@ enum {
|
|||||||
MBUS_QOS_HIGH,
|
MBUS_QOS_HIGH,
|
||||||
MBUS_QOS_HIGHEST
|
MBUS_QOS_HIGHEST
|
||||||
};
|
};
|
||||||
inline void mbus_configure_port(u8 port,
|
|
||||||
|
static void mbus_configure_port(u8 port,
|
||||||
bool bwlimit,
|
bool bwlimit,
|
||||||
bool priority,
|
bool priority,
|
||||||
u8 qos,
|
u8 qos,
|
||||||
|
@ -31,7 +31,7 @@ enum {
|
|||||||
MBUS_QOS_HIGHEST
|
MBUS_QOS_HIGHEST
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void mbus_configure_port(u8 port,
|
static void mbus_configure_port(u8 port,
|
||||||
bool bwlimit,
|
bool bwlimit,
|
||||||
bool priority,
|
bool priority,
|
||||||
u8 qos,
|
u8 qos,
|
||||||
|
@ -81,7 +81,7 @@ enum {
|
|||||||
MBUS_QOS_HIGHEST
|
MBUS_QOS_HIGHEST
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void mbus_configure_port(u8 port,
|
static void mbus_configure_port(u8 port,
|
||||||
bool bwlimit,
|
bool bwlimit,
|
||||||
bool priority,
|
bool priority,
|
||||||
u8 qos, /* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
|
u8 qos, /* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user