diff mbox series

[kvm-unit-tests,3/4] s390x: Make code compilable with -Wmissing-prototypes and -Wstrict-prototypes

Message ID 1538123582-17442-4-git-send-email-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series Compile with -Wmissing-prototypes and -Wstrict-prototypes | expand

Commit Message

Thomas Huth Sept. 28, 2018, 8:33 a.m. UTC
Include the right header in mmu.c to make sure that the implementations
match the prototypes, and avoid old-style declaration in float.h.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 lib/s390x/asm/float.h | 2 +-
 lib/s390x/mmu.c       | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

David Hildenbrand Sept. 28, 2018, 11:20 a.m. UTC | #1
On 28/09/2018 10:33, Thomas Huth wrote:
> Include the right header in mmu.c to make sure that the implementations
> match the prototypes, and avoid old-style declaration in float.h.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  lib/s390x/asm/float.h | 2 +-
>  lib/s390x/mmu.c       | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/asm/float.h b/lib/s390x/asm/float.h
> index e994e15..f61fa62 100644
> --- a/lib/s390x/asm/float.h
> +++ b/lib/s390x/asm/float.h
> @@ -24,7 +24,7 @@ static inline uint32_t get_fpc(void)
>  	return fpc;
>  }
>  
> -static inline uint8_t get_fpc_dxc()
> +static inline uint8_t get_fpc_dxc(void)
>  {
>  	return get_fpc() >> 8;
>  }
> diff --git a/lib/s390x/mmu.c b/lib/s390x/mmu.c
> index 70753c3..912236c 100644
> --- a/lib/s390x/mmu.c
> +++ b/lib/s390x/mmu.c
> @@ -15,6 +15,7 @@
>  #include <asm/arch_def.h>
>  #include <asm/barrier.h>
>  #include <vmalloc.h>
> +#include "mmu.h"
>  
>  static pgd_t *table_root;
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/lib/s390x/asm/float.h b/lib/s390x/asm/float.h
index e994e15..f61fa62 100644
--- a/lib/s390x/asm/float.h
+++ b/lib/s390x/asm/float.h
@@ -24,7 +24,7 @@  static inline uint32_t get_fpc(void)
 	return fpc;
 }
 
-static inline uint8_t get_fpc_dxc()
+static inline uint8_t get_fpc_dxc(void)
 {
 	return get_fpc() >> 8;
 }
diff --git a/lib/s390x/mmu.c b/lib/s390x/mmu.c
index 70753c3..912236c 100644
--- a/lib/s390x/mmu.c
+++ b/lib/s390x/mmu.c
@@ -15,6 +15,7 @@ 
 #include <asm/arch_def.h>
 #include <asm/barrier.h>
 #include <vmalloc.h>
+#include "mmu.h"
 
 static pgd_t *table_root;