Patchwork ARM: mx5: Fix checkpatch warnings in cpu-imx5.c

login
register
mail settings
Submitter Fabio Estevam
Date Nov. 21, 2011, 6:26 p.m.
Message ID <1321900012-8351-2-git-send-email-fabio.estevam@freescale.com>
Download mbox | patch
Permalink /patch/126893/
State New
Headers show

Comments

Fabio Estevam - Nov. 21, 2011, 6:26 p.m.
Fix the following warnings reported by checkpatch:

WARNING: Use #include <linux/io.h> instead of <asm/io.h>
#19: FILE: arm/mach-imx/cpu-imx5.c:19:
+#include <asm/io.h>

WARNING: line over 80 characters
#70: FILE: arm/mach-imx/cpu-imx5.c:70:
+	if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) {

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---

This is based on Sascha's mx5-merge tree.

 arch/arm/mach-imx/cpu-imx5.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Joe Perches - Nov. 22, 2011, 1:24 a.m.
On Mon, 2011-11-21 at 16:26 -0200, Fabio Estevam wrote:
> WARNING: line over 80 characters

Trivia...

> #70: FILE: arm/mach-imx/cpu-imx5.c:70:
> +	if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) {
[]
> diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
[]
> @@ -67,7 +67,8 @@ static int __init mx51_neon_fixup(void)
>  	if (!cpu_is_mx51())
>  		return 0;
>  
> -	if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) {
> +	if (mx51_revision() < IMX_CHIP_REVISION_3_0 &&
> +					(elf_hwcap & HWCAP_NEON)) {
>  		elf_hwcap &= ~HWCAP_NEON;
>  		pr_info("Turning off NEON support, detected broken NEON implementation\n");
>  	}

Perhaps more readable as:

	if (elf_hwcap & HWCAP_NEON &&
	    mx51_revision() < IMX_CIP_REVISION_3_0) {
		elf_hwcap &= ~HWCAP_NEON;
		etc...

Patch

diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
index 5c53282..8bbeb2a 100644
--- a/arch/arm/mach-imx/cpu-imx5.c
+++ b/arch/arm/mach-imx/cpu-imx5.c
@@ -16,7 +16,7 @@ 
 #include <linux/init.h>
 #include <linux/module.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 static int mx5_cpu_rev = -1;
 
@@ -67,7 +67,8 @@  static int __init mx51_neon_fixup(void)
 	if (!cpu_is_mx51())
 		return 0;
 
-	if (mx51_revision() < IMX_CHIP_REVISION_3_0 && (elf_hwcap & HWCAP_NEON)) {
+	if (mx51_revision() < IMX_CHIP_REVISION_3_0 &&
+					(elf_hwcap & HWCAP_NEON)) {
 		elf_hwcap &= ~HWCAP_NEON;
 		pr_info("Turning off NEON support, detected broken NEON implementation\n");
 	}