All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs, dax: fix build warning for !CONFIG_FS_DAX_PMD case for dax_iomap_pmd_fault
@ 2017-02-27 16:51 ` Dave Jiang
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jiang @ 2017-02-27 16:51 UTC (permalink / raw)
  To: akpm
  Cc: sfr, mawilcox, linux-nvdimm, dave.hansen, linux-mm,
	kirill.shutemov, jack, torvalds, vbabka

Stephen reported:
With just Linus' tree, today's linux-next build (powerpc ppc64_defconfig)
produced this warning:

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 [-Wdiscarded-qualifiers]
   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)
            ^

Introduced by

  commit a2d581675d48 ("mm,fs,dax: change ->pmd_fault to ->huge_fault")

which missed fixing up the !CONFIG_FS_DAX_PMD case.


Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 fs/dax.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/dax.c b/fs/dax.c
index 5ae8b71..7436c98 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;
 }

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] fs, dax: fix build warning for !CONFIG_FS_DAX_PMD case for dax_iomap_pmd_fault
@ 2017-02-27 16:51 ` Dave Jiang
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jiang @ 2017-02-27 16:51 UTC (permalink / raw)
  To: akpm
  Cc: sfr, dave.hansen, mawilcox, linux-nvdimm, linux-mm, vbabka, jack,
	dan.j.williams, torvalds, ross.zwisler, kirill.shutemov

Stephen reported:
With just Linus' tree, today's linux-next build (powerpc ppc64_defconfig)
produced this warning:

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 [-Wdiscarded-qualifiers]
   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)
            ^

Introduced by

  commit a2d581675d48 ("mm,fs,dax: change ->pmd_fault to ->huge_fault")

which missed fixing up the !CONFIG_FS_DAX_PMD case.


Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 fs/dax.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/dax.c b/fs/dax.c
index 5ae8b71..7436c98 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;
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-27 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 16:51 [PATCH] fs, dax: fix build warning for !CONFIG_FS_DAX_PMD case for dax_iomap_pmd_fault Dave Jiang
2017-02-27 16:51 ` Dave Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.