]> xenbits.xensource.com Git - xen.git/commitdiff
xen/x86: Address two misc MISRA 17.7 violations
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 May 2024 15:22:08 +0000 (16:22 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 May 2024 16:26:39 +0000 (17:26 +0100)
Neither text_poke() nor watchdog_setup() have their return value consulted.
Switch them to being void.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Release-acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/arch/x86/alternative.c
xen/arch/x86/nmi.c
xen/include/xen/watchdog.h

index 2e7ba6e0b8330f412e00420b8bd1167b6f0d81c2..7824053c9d3300cfa91a9dbb75bd9f7e4e3e553b 100644 (file)
@@ -155,10 +155,10 @@ void init_or_livepatch add_nops(void *insns, unsigned int len)
  * "noinline" to cause control flow change and thus invalidate I$ and
  * cause refetch after modification.
  */
-static void *init_or_livepatch noinline
+static void init_or_livepatch noinline
 text_poke(void *addr, const void *opcode, size_t len)
 {
-    return memcpy(addr, opcode, len);
+    memcpy(addr, opcode, len);
 }
 
 extern void *const __initdata_cf_clobber_start[];
index f6329cb0270e3f9925aff665905c6b3d50b7ca92..9793fa23168dd4d18f5b54047a671c383c1107f3 100644 (file)
@@ -464,12 +464,12 @@ bool watchdog_enabled(void)
     return !atomic_read(&watchdog_disable_count);
 }
 
-int __init watchdog_setup(void)
+void __init watchdog_setup(void)
 {
     unsigned int cpu;
 
     /*
-     * Activate periodic heartbeats. We cannot do this earlier during 
+     * Activate periodic heartbeats. We cannot do this earlier during
      * setup because the timer infrastructure is not available.
      */
     for_each_online_cpu ( cpu )
@@ -477,7 +477,6 @@ int __init watchdog_setup(void)
     register_cpu_notifier(&cpu_nmi_nfb);
 
     watchdog_enable();
-    return 0;
 }
 
 /* Returns false if this was not a watchdog NMI, true otherwise */
index 86fde0884ae7863b85bec677e5354930f6d2e07f..4c2840bd91e23d5723d4acd97f50d78524b4b53d 100644 (file)
@@ -12,7 +12,7 @@
 #ifdef CONFIG_WATCHDOG
 
 /* Try to set up a watchdog. */
-int watchdog_setup(void);
+void watchdog_setup(void);
 
 /* Enable the watchdog. */
 void watchdog_enable(void);