[PATCH 3/4] firmware: ti_sci: Remove inline keyword from functions

Andrew Davis afd at ti.com
Tue Jul 26 03:25:05 CEST 2022

The inline hint is not needed here, the compiler will do the right thing
based on if we are compiling for speed or for code size. In this case the
inline causes this function to be placed inside each callsite which is
not the right thing to do for either speed nor size. There is no
performance benefit to this due to the larger function size reducing
cache locality, but there is a huge size penalty. Remove inline keyword.

Signed-off-by: Andrew Davis <afd at ti.com>
 drivers/firmware/ti_sci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 687acbf2b4..facc0709ae 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -164,7 +164,7 @@ static struct ti_sci_xfer *ti_sci_setup_one_xfer(struct ti_sci_info *info,
  *	   return corresponding error, else if all goes well,
  *	   return 0.
-static inline int ti_sci_get_response(struct ti_sci_info *info,
+static int ti_sci_get_response(struct ti_sci_info *info,
 				      struct ti_sci_xfer *xfer,
 				      struct mbox_chan *chan)
@@ -218,7 +218,7 @@ static inline int ti_sci_get_response(struct ti_sci_info *info,
  * Return: 0 if all went fine, else return appropriate error.
-static inline int ti_sci_do_xfer(struct ti_sci_info *info,
+static int ti_sci_do_xfer(struct ti_sci_info *info,
 				 struct ti_sci_xfer *xfer)
 	struct k3_sec_proxy_msg *msg = &xfer->tx_message;
@@ -310,7 +310,7 @@ static int ti_sci_cmd_get_revision(struct ti_sci_handle *handle)
  * Return: true if the response was an ACK, else returns false.
-static inline bool ti_sci_is_response_ack(void *r)
+static bool ti_sci_is_response_ack(void *r)
 	struct ti_sci_msg_hdr *hdr = r;

More information about the U-Boot mailing list