public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
To: Nico Boehr <nrb@linux.ibm.com>,
	frankja@linux.ibm.com, imbrenda@linux.ibm.com, thuth@redhat.com
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v1] lib: s390x: mmu: fix conflicting types for get_dat_entry
Date: Mon, 08 May 2023 14:25:26 +0200	[thread overview]
Message-ID: <3e3cc7dc5a77040f379e90162f76e285839f083f.camel@linux.ibm.com> (raw)
In-Reply-To: <20230508102426.130768-1-nrb@linux.ibm.com>

On Mon, 2023-05-08 at 12:24 +0200, Nico Boehr wrote:
> This causes compilation to fail with GCC 13:
> 
> gcc -std=gnu99 -ffreestanding -I/kut/lib -I/kut/lib/s390x -Ilib -O2 -march=zEC12 -mbackchain -fno-delete-null-pointer-checks -g -MMD -MF lib/s390x/.mmu.d -fno-strict-aliasing -fno-common -Wall -Wwrite-strings -Wempty-body -Wuninitialized -Wignored-qualifiers -Wno-missing-braces -Werror  -fomit-frame-pointer  -fno-stack-protector    -Wno-frame-address   -fno-pic  -no-pie  -Wclobbered  -Wunused-but-set-parameter  -Wmissing-parameter-type  -Wold-style-declaration -Woverride-init -Wmissing-prototypes -Wstrict-prototypes -I/kut/lib -I/kut/lib/s390x -Ilib  -c -o lib/s390x/mmu.o lib/s390x/mmu.c
> lib/s390x/mmu.c:132:7: error: conflicting types for ‘get_dat_entry’ due to enum/integer mismatch; have ‘void *(pgd_t *, void *, enum pgt_level)’ [-Werror=enum-int-mismatch]
>   132 | void *get_dat_entry(pgd_t *pgtable, void *vaddr, enum pgt_level level)
>       |       ^~~~~~~~~~~~~
> In file included from lib/s390x/mmu.c:16:
> lib/s390x/mmu.h:96:7: note: previous declaration of ‘get_dat_entry’ with type ‘void *(pgd_t *, void *, unsigned int)’
>    96 | void *get_dat_entry(pgd_t *pgtable, void *vaddr, unsigned int level);
>       |       ^~~~~~~~~~~~~
> 
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>

Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> ---
>  lib/s390x/mmu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/mmu.h b/lib/s390x/mmu.h
> index 15f88e4f424e..dadc2e600f9a 100644
> --- a/lib/s390x/mmu.h
> +++ b/lib/s390x/mmu.h
> @@ -93,6 +93,6 @@ static inline void unprotect_page(void *vaddr, unsigned long prot)
>  	unprotect_dat_entry(vaddr, prot, pgtable_level_pte);
>  }
> 
> -void *get_dat_entry(pgd_t *pgtable, void *vaddr, unsigned int level);
> +void *get_dat_entry(pgd_t *pgtable, void *vaddr, enum pgt_level level);
> 
>  #endif /* _ASMS390X_MMU_H_ */


  parent reply	other threads:[~2023-05-08 12:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 10:24 [kvm-unit-tests PATCH v1] lib: s390x: mmu: fix conflicting types for get_dat_entry Nico Boehr
2023-05-08 10:53 ` Thomas Huth
2023-05-08 12:25 ` Nina Schoetterl-Glausch [this message]
2023-05-09 15:18 ` Claudio Imbrenda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e3cc7dc5a77040f379e90162f76e285839f083f.camel@linux.ibm.com \
    --to=nsg@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox