[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.17] xen/x86: Remove the use of K&R functions



commit 8f11b6e942dbf02592de2ab3338226f0cd3ee3ac
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Jul 17 09:32:07 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jul 17 09:32:07 2023 +0200

    xen/x86: Remove the use of K&R functions
    
    Clang-15 (as seen in the FreeBSD 14 tests) complains:
    
      arch/x86/time.c:1364:20: error: a function declaration without a
      prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
      s_time_t get_s_time()
                         ^
                          void
    
    The error message is a bit confusing but appears to new as part of
    -Wdeprecated-non-prototype which is part of supporting C2x which formally
    removes K&R syntax.
    
    Either way, fix the identified functions.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    master commit: 22b2fa4766728c3057757c00e79da5f7803fff33
    master date: 2023-02-17 11:01:54 +0000
---
 xen/arch/x86/hvm/vmx/vmcs.c     | 2 +-
 xen/arch/x86/time.c             | 2 +-
 xen/drivers/passthrough/iommu.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 7912053bda..bcbecc6945 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -782,7 +782,7 @@ static int _vmx_cpu_up(bool bsp)
     return 0;
 }
 
-int cf_check vmx_cpu_up()
+int cf_check vmx_cpu_up(void)
 {
     return _vmx_cpu_up(false);
 }
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index d882b43cf0..b664ae4c83 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1361,7 +1361,7 @@ s_time_t get_s_time_fixed(u64 at_tsc)
     return t->stamp.local_stime + scale_delta(delta, &t->tsc_scale);
 }
 
-s_time_t get_s_time()
+s_time_t get_s_time(void)
 {
     return get_s_time_fixed(0);
 }
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 5e2a720d29..df803afb79 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -598,7 +598,7 @@ int __init iommu_setup(void)
     return rc;
 }
 
-int iommu_suspend()
+int iommu_suspend(void)
 {
     if ( iommu_enabled )
         return iommu_call(iommu_get_ops(), suspend);
@@ -606,7 +606,7 @@ int iommu_suspend()
     return 0;
 }
 
-void iommu_resume()
+void iommu_resume(void)
 {
     if ( iommu_enabled )
         iommu_vcall(iommu_get_ops(), resume);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.