[linux-yocto] [PATCH 14/30] arm: mmu: Fixed checkpatch issues with mmu
From: Anders Berg anders.b...@lsi.com This patch fixes the checkpatch issues with mmu. This patch is separate to keep the continuity of the previous patches that used copies of upstream patches to update. Signed-off-by: Anders Berg anders.b...@lsi.com --- arch/arm/mm/mmu.c | 76 +++-- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 571102e..f3f16dc 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -53,13 +53,13 @@ pmd_t *top_pmd; #define CPOLICY_WRITEALLOC 4 static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; -static unsigned int ecc_mask __initdata = 0; +static unsigned int ecc_mask __initdata; pgprot_t pgprot_user; -pgprot_t pgprot_kernel; - EXPORT_SYMBOL(pgprot_user); +pgprot_t pgprot_kernel; EXPORT_SYMBOL(pgprot_kernel); + struct cachepolicy { const char policy[16]; unsigned intcr_mask; @@ -194,8 +194,8 @@ void adjust_cr(unsigned long mask, unsigned long set) } #endif -#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN -#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE +#define PROT_PTE_DEVICE (L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN) +#define PROT_SECT_DEVICE (PMD_TYPE_SECT|PMD_SECT_AP_WRITE) static struct mem_type mem_types[] = { [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ @@ -216,7 +216,7 @@ static struct mem_type mem_types[] = { .prot_l1= PMD_TYPE_TABLE, .prot_sect = PROT_SECT_DEVICE | PMD_SECT_WB, .domain = DOMAIN_IO, - }, + }, [MT_DEVICE_WC] = { /* ioremap_wc */ .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC, .prot_l1= PMD_TYPE_TABLE, @@ -532,7 +532,7 @@ static void __init build_mem_type_table(void) mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; break; } - printk(Memory policy: ECC %sabled, Data cache %s\n, + printk(KERN_INFO Memory policy: ECC %sabled, Data cache %s\n, ecc_mask ? en : dis, cp-policy); for (i = 0; i ARRAY_SIZE(mem_types); i++) { @@ -653,9 +653,8 @@ static void __init create_36bit_mapping(struct map_desc *md, length = PAGE_ALIGN(md-length); if (!(cpu_architecture() = CPU_ARCH_ARMv6 || cpu_is_xsc3())) { - printk(KERN_ERR MM: CPU does not support supersection - mapping for 0x%08llx at 0x%08lx\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: CPU does not support supersection mapping for 0x%08llx at 0x%08lx\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } @@ -666,16 +665,14 @@ static void __init create_36bit_mapping(struct map_desc *md, * of the actual domain assignments in use. */ if (type-domain) { - printk(KERN_ERR MM: invalid domain in supersection - mapping for 0x%08llx at 0x%08lx\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: invalid domain in supersection mapping for 0x%08llx at 0x%08lx\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } if ((addr | length | __pfn_to_phys(md-pfn)) ~SUPERSECTION_MASK) { - printk(KERN_ERR MM: cannot create mapping for 0x%08llx - at 0x%08lx invalid alignment\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: cannot create mapping for 0x%08llx at 0x%08lx invalid alignment\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } @@ -717,18 +714,16 @@ static void __init create_mapping(struct map_desc *md) pgd_t *pgd; if (md-virtual != vectors_base() md-virtual TASK_SIZE) { - printk(KERN_WARNING BUG: not creating mapping for 0x%08llx - at 0x%08lx in user region\n, - (long long)__pfn_to_phys((u64)md-pfn), md-virtual); + printk(KERN_WARNING BUG: not creating mapping for 0x%08llx at 0x%08lx in user region\n, + (long long)__pfn_to_phys((u64)md-pfn), md-virtual); return; } if ((md-type == MT_DEVICE || md-type == MT_ROM) md-virtual = PAGE_OFFSET (md-virtual VMALLOC_START || md-virtual = VMALLOC_END)) { - printk(KERN_WARNING BUG: mapping for 0x%08llx - at 0x%08lx out of vmalloc space\n, - (long long)__pfn_to_phys((u64)md-pfn), md-virtual); +
[linux-yocto] [PATCH 14/30] arm: mmu: Fixed checkpatch issues with mmu
From: Anders Berg anders.b...@lsi.com This patch fixes the checkpatch issues with mmu. This patch is separate to keep the continuity of the previous patches that used copies of upstream patches to update. Signed-off-by: Anders Berg anders.b...@lsi.com --- arch/arm/mm/mmu.c | 76 +++-- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 571102e..f3f16dc 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -53,13 +53,13 @@ pmd_t *top_pmd; #define CPOLICY_WRITEALLOC 4 static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; -static unsigned int ecc_mask __initdata = 0; +static unsigned int ecc_mask __initdata; pgprot_t pgprot_user; -pgprot_t pgprot_kernel; - EXPORT_SYMBOL(pgprot_user); +pgprot_t pgprot_kernel; EXPORT_SYMBOL(pgprot_kernel); + struct cachepolicy { const char policy[16]; unsigned intcr_mask; @@ -194,8 +194,8 @@ void adjust_cr(unsigned long mask, unsigned long set) } #endif -#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN -#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE +#define PROT_PTE_DEVICE (L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN) +#define PROT_SECT_DEVICE (PMD_TYPE_SECT|PMD_SECT_AP_WRITE) static struct mem_type mem_types[] = { [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ @@ -216,7 +216,7 @@ static struct mem_type mem_types[] = { .prot_l1= PMD_TYPE_TABLE, .prot_sect = PROT_SECT_DEVICE | PMD_SECT_WB, .domain = DOMAIN_IO, - }, + }, [MT_DEVICE_WC] = { /* ioremap_wc */ .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC, .prot_l1= PMD_TYPE_TABLE, @@ -532,7 +532,7 @@ static void __init build_mem_type_table(void) mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; break; } - printk(Memory policy: ECC %sabled, Data cache %s\n, + printk(KERN_INFO Memory policy: ECC %sabled, Data cache %s\n, ecc_mask ? en : dis, cp-policy); for (i = 0; i ARRAY_SIZE(mem_types); i++) { @@ -653,9 +653,8 @@ static void __init create_36bit_mapping(struct map_desc *md, length = PAGE_ALIGN(md-length); if (!(cpu_architecture() = CPU_ARCH_ARMv6 || cpu_is_xsc3())) { - printk(KERN_ERR MM: CPU does not support supersection - mapping for 0x%08llx at 0x%08lx\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: CPU does not support supersection mapping for 0x%08llx at 0x%08lx\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } @@ -666,16 +665,14 @@ static void __init create_36bit_mapping(struct map_desc *md, * of the actual domain assignments in use. */ if (type-domain) { - printk(KERN_ERR MM: invalid domain in supersection - mapping for 0x%08llx at 0x%08lx\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: invalid domain in supersection mapping for 0x%08llx at 0x%08lx\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } if ((addr | length | __pfn_to_phys(md-pfn)) ~SUPERSECTION_MASK) { - printk(KERN_ERR MM: cannot create mapping for 0x%08llx - at 0x%08lx invalid alignment\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: cannot create mapping for 0x%08llx at 0x%08lx invalid alignment\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } @@ -717,18 +714,16 @@ static void __init create_mapping(struct map_desc *md) pgd_t *pgd; if (md-virtual != vectors_base() md-virtual TASK_SIZE) { - printk(KERN_WARNING BUG: not creating mapping for 0x%08llx - at 0x%08lx in user region\n, - (long long)__pfn_to_phys((u64)md-pfn), md-virtual); + printk(KERN_WARNING BUG: not creating mapping for 0x%08llx at 0x%08lx in user region\n, + (long long)__pfn_to_phys((u64)md-pfn), md-virtual); return; } if ((md-type == MT_DEVICE || md-type == MT_ROM) md-virtual = PAGE_OFFSET (md-virtual VMALLOC_START || md-virtual = VMALLOC_END)) { - printk(KERN_WARNING BUG: mapping for 0x%08llx - at 0x%08lx out of vmalloc space\n, - (long long)__pfn_to_phys((u64)md-pfn), md-virtual); +