watchdog: light_wdt: Fix warnings 01/319601/2 accepted/tizen/unified/x/20241031.045857
authorMichal Wilczynski <m.wilczynski@samsung.com>
Mon, 28 Oct 2024 09:21:17 +0000 (10:21 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 30 Oct 2024 04:07:25 +0000 (04:07 +0000)
This fixes following warning:

In function 'light_wdt_update_timeout':
drivers/watchdog/light_wdt.c:116:51: warning: implicit
conversion from
'enum light_aon_wdg_func' to 'enum light_aon_misc_func'
[-Wenum-conversion]
light_wdt_msg_hdr_fill(&wdt_dev->msg.hdr,
LIGHT_AON_WDG_FUNC_TIMEOUTSET);

Also, add a 'static' to a static function to suppress other warning.

Change-Id: Ia8f4daa37c58beffc8d0bdb8bcef20108cb282ab
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
drivers/watchdog/light_wdt.c

index d3ba15dd650ea8ff79ef04251f0b91d3d80c01d3..b57314c65228e888ae676099359d28e8d3435806 100644 (file)
@@ -70,7 +70,7 @@ static unsigned int light_wdt_timeout_to_sel(unsigned secs)
        return LIGHT_TWDSCALE_MAX;
 }
 
-static void light_wdt_msg_hdr_fill(struct light_aon_rpc_msg_hdr *hdr, enum light_aon_misc_func func)
+static void light_wdt_msg_hdr_fill(struct light_aon_rpc_msg_hdr *hdr, enum light_aon_wdg_func func)
 {
        hdr->svc = (uint8_t)LIGHT_AON_RPC_SVC_WDG;
        hdr->func = (uint8_t)func;
@@ -264,7 +264,7 @@ static ssize_t aon_sys_wdt_store(struct device *dev,
        return size;
 }
 
-void light_pm_power_off(void)
+static void light_pm_power_off(void)
 {
        struct light_wdt_device *wdt_dev = light_power_off_wdt;
        struct light_aon_ipc *ipc = wdt_dev->ipc_handle;