linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: "Jérémy Lefaure" <jeremy.lefaure@lse.epita.fr>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Matthew Wilcox" <mawilcox@microsoft.com>,
	"Ross Zwisler" <ross.zwisler@linux.intel.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] dax: constify second argument of dax_iomap_pmd_fault
Date: Tue, 28 Feb 2017 09:38:37 -0700	[thread overview]
Message-ID: <064cb286-f65e-8941-867d-3103b485d526@intel.com> (raw)
In-Reply-To: <20170228002023.23239-1-jeremy.lefaure@lse.epita.fr>



On 02/27/2017 05:20 PM, Jérémy Lefaure wrote:
> When CONFIG_FS_DAX_PMD is disabled, the second argument of the function
> dax_iomap_pmd_fault is not a const pointer. The compiler raises a
> warning about that:
> fs/dax.c: In function ‘dax_iomap_fault’:
> fs/dax.c:1462:35: warning: passing argument 2 of ‘dax_iomap_pmd_fault’
> discards ‘const’ qualifier from pointer target type
>    return dax_iomap_pmd_fault(vmf, ops);
>                                    ^~~
> fs/dax.c:1439:12: note: expected ‘struct iomap_ops *’ but argument is of
> type ‘const struct iomap_ops *’
> static int dax_iomap_pmd_fault(struct vm_fault *vmf, struct iomap_ops *ops)
>            ^~~~~~~~~~~~~~~~~~~
> 
> Constifying the second argument as it is when CONFIG_FX_DAX_PMD is
> enabled fixes this warning.
> 
> Fixes: a2d581675d48("mm,fs,dax: change ->pmd_fault to ->huge_fault")
> Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>

Thanks. Fix already submitted.
http://marc.info/?l=linux-mm&m=148821429608976&w=2


> ---
>  fs/dax.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/dax.c b/fs/dax.c
> index 5ae8b71ebadc..7436c98b92c8 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -1436,7 +1436,8 @@ static int dax_iomap_pmd_fault(struct vm_fault *vmf,
>  	return result;
>  }
>  #else
> -static int dax_iomap_pmd_fault(struct vm_fault *vmf, struct iomap_ops *ops)
> +static int dax_iomap_pmd_fault(struct vm_fault *vmf,
> +			       const struct iomap_ops *ops)
>  {
>  	return VM_FAULT_FALLBACK;
>  }
> 

      reply	other threads:[~2017-02-28 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28  0:20 [PATCH] dax: constify second argument of dax_iomap_pmd_fault Jérémy Lefaure
2017-02-28 16:38 ` Dave Jiang [this message]

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=064cb286-f65e-8941-867d-3103b485d526@intel.com \
    --to=dave.jiang@intel.com \
    --cc=jeremy.lefaure@lse.epita.fr \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).