linux-hexagon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hexagon: correct type on pgd copy
@ 2013-12-06  2:13 Ilia Mirkin
  2013-12-06 21:15 ` rkuo
  0 siblings, 1 reply; 2+ messages in thread
From: Ilia Mirkin @ 2013-12-06  2:13 UTC (permalink / raw)
  To: Richard Kuo; +Cc: linux-hexagon, Ilia Mirkin

swapper_pg_dir is an array of pgd_t, not pgd_t*. This has no actual
effect since sizeof(pgd_t) == sizeof(pgd_t*), but unconfuses tools that
check types.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---

Looks like I wrote this ~2 years ago, when I was playing around with spatch,
but forgot to send it out (along with a few other patches which no longer
applied). This still seems valid though.

 arch/hexagon/include/asm/pgalloc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h
index 4c9d382..77da3b0 100644
--- a/arch/hexagon/include/asm/pgalloc.h
+++ b/arch/hexagon/include/asm/pgalloc.h
@@ -45,7 +45,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 	 * map with a copy of the kernel's persistent map.
 	 */
 
-	memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t *));
+	memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t));
 	mm->context.generation = kmap_generation;
 
 	/* Physical version is what is passed to virtual machine on switch */
-- 
1.8.3.2

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

end of thread, other threads:[~2013-12-06 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06  2:13 [PATCH] hexagon: correct type on pgd copy Ilia Mirkin
2013-12-06 21:15 ` rkuo

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