Commit 8124c711 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Alexandre Belloni

rtc: s5m: De-inline large functions to save space

Few functions were marked inline even though they were relatively large
and sometimes used in multiple places. De-inline them to let the
compiler decide whether optimization makes sense. This fixes inline_hunt
report:
drivers/rtc/rtc-s5m.c: Deinline s5m8767_rtc_set_alarm_reg, save 704 bytes
drivers/rtc/rtc-s5m.c: Deinline s5m8767_wait_for_udr_update, save 192 bytes
Reported-by: default avatarDenys Vlasenko <vda.linux@googlemail.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 270a3bd6
...@@ -216,7 +216,7 @@ static int s5m8767_tm_to_data(struct rtc_time *tm, u8 *data) ...@@ -216,7 +216,7 @@ static int s5m8767_tm_to_data(struct rtc_time *tm, u8 *data)
* Read RTC_UDR_CON register and wait till UDR field is cleared. * Read RTC_UDR_CON register and wait till UDR field is cleared.
* This indicates that time/alarm update ended. * This indicates that time/alarm update ended.
*/ */
static inline int s5m8767_wait_for_udr_update(struct s5m_rtc_info *info) static int s5m8767_wait_for_udr_update(struct s5m_rtc_info *info)
{ {
int ret, retry = UDR_READ_RETRY_CNT; int ret, retry = UDR_READ_RETRY_CNT;
unsigned int data; unsigned int data;
...@@ -231,7 +231,7 @@ static inline int s5m8767_wait_for_udr_update(struct s5m_rtc_info *info) ...@@ -231,7 +231,7 @@ static inline int s5m8767_wait_for_udr_update(struct s5m_rtc_info *info)
return ret; return ret;
} }
static inline int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info, static int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info,
struct rtc_wkalrm *alarm) struct rtc_wkalrm *alarm)
{ {
int ret; int ret;
...@@ -264,7 +264,7 @@ static inline int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info, ...@@ -264,7 +264,7 @@ static inline int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info,
return 0; return 0;
} }
static inline int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info) static int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info)
{ {
int ret; int ret;
unsigned int data; unsigned int data;
...@@ -288,7 +288,7 @@ static inline int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info) ...@@ -288,7 +288,7 @@ static inline int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info)
return ret; return ret;
} }
static inline int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info) static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
{ {
int ret; int ret;
unsigned int data; unsigned int data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment