Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481212 > unrolled thread
| Started by | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| First post | 2016-09-12 14:40 +0200 |
| Last post | 2016-09-12 18:30 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-12 14:40 +0200
Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h kbuild test robot <lkp@intel.com> - 2016-09-12 17:20 +0200
Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h Arnd Bergmann <arnd@arndb.de> - 2016-09-12 17:30 +0200
Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h kbuild test robot <lkp@intel.com> - 2016-09-12 17:50 +0200
Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h kbuild test robot <lkp@intel.com> - 2016-09-12 18:30 +0200
| From | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| Date | 2016-09-12 14:40 +0200 |
| Subject | [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h |
| Message-ID | <sgyGK-3jx-9@gated-at.bofh.it> |
We get 1 warning when building kernel with W=1:
drivers/char/mem.c:220:12: warning: no previous prototype for 'phys_mem_access_prot_allowed' [-Wmissing-prototypes]
int __weak phys_mem_access_prot_allowed(struct file *file,
In fact, its declaration is spreading to several header files
in different architecture, but need to be declare in common
header file.
So this patch moves phys_mem_access_prot_allowed() to pgtable.h.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
arch/mips/include/asm/pgtable.h | 2 --
arch/x86/include/asm/pgtable_types.h | 2 --
include/asm-generic/pgtable.h | 3 +++
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 70128d3..9e9e944 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -673,8 +673,6 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
struct file;
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
unsigned long size, pgprot_t vma_prot);
-int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
- unsigned long size, pgprot_t *vma_prot);
#endif
/*
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index f1218f5..8b4de22 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -439,8 +439,6 @@ extern pgprot_t pgprot_writethrough(pgprot_t prot);
struct file;
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
unsigned long size, pgprot_t vma_prot);
-int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
- unsigned long size, pgprot_t *vma_prot);
/* Install a pte for a particular vaddr in kernel space. */
void set_pte_vaddr(unsigned long vaddr, pte_t pte);
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index d4458b6..ad625dd 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -814,4 +814,7 @@ static inline int pmd_clear_huge(pmd_t *pmd)
#endif
#endif
+struct file;
+int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
+ unsigned long size, pgprot_t *vma_prot);
#endif /* _ASM_GENERIC_PGTABLE_H */
--
2.7.4
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-09-12 17:20 +0200 |
| Subject | Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h |
| Message-ID | <sgBbA-50s-17@gated-at.bofh.it> |
| In reply to | #1481212 |
[Multipart message — attachments visible in raw view] — view raw
Hi Baoyou,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc6 next-20160912]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Baoyou-Xie/mm-move-phys_mem_access_prot_allowed-declaration-to-pgtable-h/20160912-211348
config: parisc-c3000_defconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=parisc
All errors (new ones prefixed by >>):
include/asm-generic/pgtable.h: Assembler messages:
>> include/asm-generic/pgtable.h:817: Error: Unknown opcode: `struct'
>> include/asm-generic/pgtable.h:818: Error: Unknown opcode: `int'
>> include/asm-generic/pgtable.h:819: Error: Unknown opcode: `unsigned'
vim +817 include/asm-generic/pgtable.h
811 #define has_transparent_hugepage() 1
812 #else
813 #define has_transparent_hugepage() 0
814 #endif
815 #endif
816
> 817 struct file;
> 818 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
> 819 unsigned long size, pgprot_t *vma_prot);
820 #endif /* _ASM_GENERIC_PGTABLE_H */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-12 17:30 +0200 |
| Message-ID | <sgBlf-548-19@gated-at.bofh.it> |
| In reply to | #1481418 |
On Monday, September 12, 2016 11:13:45 PM CEST kbuild test robot wrote: > 816 > > 817 struct file; > > 818 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, > > 819 unsigned long size, pgprot_t *vma_prot); > 820 #endif /* _ASM_GENERIC_PGTABLE_H */ This should be inside of the #ifdef __ASSEMBLY__ Arnd
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-09-12 17:50 +0200 |
| Subject | Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h |
| Message-ID | <sgBEC-5cu-21@gated-at.bofh.it> |
| In reply to | #1481212 |
[Multipart message — attachments visible in raw view] — view raw
Hi Baoyou,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc6 next-20160912]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Baoyou-Xie/mm-move-phys_mem_access_prot_allowed-declaration-to-pgtable-h/20160912-211348
config: m32r-m32104ut_defconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m32r
All errors (new ones prefixed by >>):
include/asm-generic/pgtable.h: Assembler messages:
>> include/asm-generic/pgtable.h:817: Error: bad instruction `struct file'
>> include/asm-generic/pgtable.h:818: Error: bad instruction `int phys_mem_access_prot_allowed(struct file*file,...'
>> include/asm-generic/pgtable.h:819: Error: bad instruction `unsigned long size,pgprot_t*vma_prot)'
vim +817 include/asm-generic/pgtable.h
811 #define has_transparent_hugepage() 1
812 #else
813 #define has_transparent_hugepage() 0
814 #endif
815 #endif
816
> 817 struct file;
> 818 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
> 819 unsigned long size, pgprot_t *vma_prot);
820 #endif /* _ASM_GENERIC_PGTABLE_H */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-09-12 18:30 +0200 |
| Subject | Re: [PATCH] mm: move phys_mem_access_prot_allowed() declaration to pgtable.h |
| Message-ID | <sgChj-5GQ-13@gated-at.bofh.it> |
| In reply to | #1481212 |
[Multipart message — attachments visible in raw view] — view raw
Hi Baoyou,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc6 next-20160912]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Baoyou-Xie/mm-move-phys_mem_access_prot_allowed-declaration-to-pgtable-h/20160912-211348
config: xtensa-common_defconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa
All errors (new ones prefixed by >>):
include/asm-generic/pgtable.h: Assembler messages:
>> include/asm-generic/pgtable.h:817: Error: unknown opcode or format name 'struct'
>> include/asm-generic/pgtable.h:818: Error: extra comma
>> include/asm-generic/pgtable.h:818: Error: syntax error
>> include/asm-generic/pgtable.h:819: Error: unknown opcode or format name 'unsigned'
vim +/struct +817 include/asm-generic/pgtable.h
811 #define has_transparent_hugepage() 1
812 #else
813 #define has_transparent_hugepage() 0
814 #endif
815 #endif
816
> 817 struct file;
> 818 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
> 819 unsigned long size, pgprot_t *vma_prot);
820 #endif /* _ASM_GENERIC_PGTABLE_H */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web