mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	linux-s390@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/mm: Silence compiler warning when compiling without CONFIG_PGSTE
Date: Mon, 8 Apr 2019 09:09:19 +0200	[thread overview]
Message-ID: <0e63589f-190f-d3a4-b373-4188dfe54e26@redhat.com> (raw)
In-Reply-To: <20190407125509.6380-1-thuth@redhat.com>

On 07.04.19 14:55, Thomas Huth wrote:
> If CONFIG_PGSTE is not set (e.g. when compiling without KVM), GCC complains:
> 
>   CC      arch/s390/mm/pgtable.o
> arch/s390/mm/pgtable.c:413:15: warning: ‘pmd_alloc_map’ defined but not
>  used [-Wunused-function]
>  static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr)
>                ^~~~~~~~~~~~~
> 
> Wrap the function with "#ifdef CONFIG_PGSTE" to silence the warning.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  arch/s390/mm/pgtable.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
> index 8485d6dc2754..9ebd01219812 100644
> --- a/arch/s390/mm/pgtable.c
> +++ b/arch/s390/mm/pgtable.c
> @@ -410,6 +410,7 @@ static inline pmd_t pmdp_flush_lazy(struct mm_struct *mm,
>  	return old;
>  }
>  
> +#ifdef CONFIG_PGSTE
>  static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr)
>  {
>  	pgd_t *pgd;
> @@ -427,6 +428,7 @@ static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr)
>  	pmd = pmd_alloc(mm, pud, addr);
>  	return pmd;
>  }
> +#endif
>  

We could also move the function down to the functions where it is used

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

-- 

Thanks,

David / dhildenb

  reply	other threads:[~2019-04-08  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07 12:55 Thomas Huth
2019-04-08  7:09 ` David Hildenbrand [this message]
2019-04-08 10:36   ` Thomas Huth
2019-04-08 13:28     ` Heiko Carstens

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=0e63589f-190f-d3a4-b373-4188dfe54e26@redhat.com \
    --to=david@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.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

all inboxes | Powered by JetHome®