From: shijie8@gmail.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: move mem_type's real definition to asm/mach/map.h
Date: Tue, 6 Mar 2012 00:07:16 -0500 [thread overview]
Message-ID: <1331010436-31576-1-git-send-email-shijie8@gmail.com> (raw)
If we use the mem_type in the driver. We will meet the compiler error:
"error: dereferencing pointer to incomplete type"
Move mem_type's real definition to asm/mach/map.h to fix it.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
---
arch/arm/include/asm/mach/map.h | 8 +++++++-
arch/arm/mm/mm.h | 7 +------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
index b36f365..a5ee07d 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -34,7 +34,13 @@ struct map_desc {
#ifdef CONFIG_MMU
extern void iotable_init(struct map_desc *, int);
-struct mem_type;
+struct mem_type {
+ pteval_t prot_pte;
+ pmdval_t prot_l1;
+ pmdval_t prot_sect;
+ unsigned int domain;
+};
+
extern const struct mem_type *get_mem_type(unsigned int type);
/*
* external interface to remap single page with appropriate type
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index 70f6d3ea..1930bc9 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -10,12 +10,7 @@ static inline pmd_t *pmd_off_k(unsigned long virt)
return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt);
}
-struct mem_type {
- pteval_t prot_pte;
- pmdval_t prot_l1;
- pmdval_t prot_sect;
- unsigned int domain;
-};
+struct mem_type;
const struct mem_type *get_mem_type(unsigned int type);
--
1.7.4.4
next reply other threads:[~2012-03-06 5:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 5:07 Huang Shijie [this message]
2012-03-05 17:37 ` [PATCH] ARM: move mem_type's real definition to asm/mach/map.h Russell King - ARM Linux
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=1331010436-31576-1-git-send-email-shijie8@gmail.com \
--to=shijie8@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).