linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: cacheflush_32.h needs <linux/mm.h>
@ 2022-04-09  6:02 Randy Dunlap
  2022-04-09  7:46 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2022-04-09  6:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Herbert Xu, David S . Miller,
	sparclinux

Add <linux/mm.h> to cacheflush_32.h just as in cacheflush_64.h.
Fixes this build warning:

  CC      drivers/crypto/xilinx/zynqmp-sha.o
In file included from ../arch/sparc/include/asm/cacheflush.h:11,
                 from ../include/linux/cacheflush.h:5,
                 from ../drivers/crypto/xilinx/zynqmp-sha.c:6:
../arch/sparc/include/asm/cacheflush_32.h:38:37: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration
   38 | void sparc_flush_page_to_ram(struct page *page);

Exposed by commit 0e03b8fd2936
("crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST")
but not Fixes: that commit.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/include/asm/cacheflush_32.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/sparc/include/asm/cacheflush_32.h
+++ b/arch/sparc/include/asm/cacheflush_32.h
@@ -2,6 +2,8 @@
 #ifndef _SPARC_CACHEFLUSH_H
 #define _SPARC_CACHEFLUSH_H
 
+#include <linux/mm.h>
+
 #include <asm/cachetlb_32.h>
 
 #define flush_cache_all() \

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

* Re: [PATCH] sparc: cacheflush_32.h needs <linux/mm.h>
  2022-04-09  6:02 [PATCH] sparc: cacheflush_32.h needs <linux/mm.h> Randy Dunlap
@ 2022-04-09  7:46 ` Sam Ravnborg
  2022-04-09 15:11   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2022-04-09  7:46 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, kernel test robot, Herbert Xu, David S . Miller,
	sparclinux

Hi Randy,

On Fri, Apr 08, 2022 at 11:02:15PM -0700, Randy Dunlap wrote:
> Add <linux/mm.h> to cacheflush_32.h just as in cacheflush_64.h.

Just add a forward declaration like this to fix it:

struct page;

No need to pull in a header file when a forward is enough.

Maybe we could simplify sparc64 in a similar way, but that is another
patch and it may require extra work in other files anyway.

	Sam

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

* Re: [PATCH] sparc: cacheflush_32.h needs <linux/mm.h>
  2022-04-09  7:46 ` Sam Ravnborg
@ 2022-04-09 15:11   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2022-04-09 15:11 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-kernel, kernel test robot, Herbert Xu, David S . Miller,
	sparclinux



On 4/9/22 00:46, Sam Ravnborg wrote:
> Hi Randy,
> 
> On Fri, Apr 08, 2022 at 11:02:15PM -0700, Randy Dunlap wrote:
>> Add <linux/mm.h> to cacheflush_32.h just as in cacheflush_64.h.
> 
> Just add a forward declaration like this to fix it:
> 
> struct page;
> 
> No need to pull in a header file when a forward is enough.

Sure, will do.

> Maybe we could simplify sparc64 in a similar way, but that is another
> patch and it may require extra work in other files anyway.
> 
> 	Sam

-- 
~Randy

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

end of thread, other threads:[~2022-04-09 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-09  6:02 [PATCH] sparc: cacheflush_32.h needs <linux/mm.h> Randy Dunlap
2022-04-09  7:46 ` Sam Ravnborg
2022-04-09 15:11   ` Randy Dunlap

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).