From patchwork Tue Jun 12 17:46:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 164465 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 47ECD100826 for ; Wed, 13 Jun 2012 03:46:18 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SeV72-0006Sz-DQ; Tue, 12 Jun 2012 17:42:40 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SeV6z-0006S5-G3 for linux-arm-kernel@merlin.infradead.org; Tue, 12 Jun 2012 17:42:37 +0000 Received: from zose-mta12.web4all.fr ([178.33.204.89]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SeV6w-0001y1-H8 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jun 2012 17:42:36 +0000 Received: from localhost (localhost [127.0.0.1]) by zose-mta12.web4all.fr (Postfix) with ESMTP id 59DDF9087B; Tue, 12 Jun 2012 19:46:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose1.web4all.fr Received: from zose-mta12.web4all.fr ([127.0.0.1]) by localhost (zose-mta12.web4all.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ULV26rnYoEmF; Tue, 12 Jun 2012 19:46:51 +0200 (CEST) Received: from zose-store12.web4all.fr (zose-store-12.w4a.fr [178.33.204.48]) by zose-mta12.web4all.fr (Postfix) with ESMTP id 5973B904F3; Tue, 12 Jun 2012 19:46:51 +0200 (CEST) Date: Tue, 12 Jun 2012 19:46:43 +0200 (CEST) From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= To: Sascha Hauer , linux-arm-kernel@lists.infradead.org Message-ID: <1417597871.2526557.1339523203564.JavaMail.root@advansee.com> Subject: [PATCH] ARM: imx: cleanup otg_mode MIME-Version: 1.0 X-Originating-IP: [88.188.188.98] X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Win)/7.2.0_GA_2669) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120612_184234_701675_6BA334E1 X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Cleanup the code for the otg_mode command line param: * Use the bool type as it applies here. * Qualify otg_mode_host with __initdata since this variable is only used in this context. * The __setup functions are not supposed to return a status code, but a boolean indicating whether the param has been handled. See obsolete_checksetup() in init/main.c. Signed-off-by: Benoît Thébaudeau --- .../arch/arm/mach-imx/mach-cpuimx27.c | 8 ++++---- .../arch/arm/mach-imx/mach-cpuimx35.c | 8 ++++---- .../arch/arm/mach-imx/mach-cpuimx51sd.c | 8 ++++---- .../arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 8 ++++---- .../arch/arm/mach-imx/mach-mx27_3ds.c | 8 ++++---- .../arch/arm/mach-imx/mach-mx31_3ds.c | 8 ++++---- .../arch/arm/mach-imx/mach-mx35_3ds.c | 8 ++++---- .../arch/arm/mach-imx/mach-mx51_babbage.c | 8 ++++---- .../arch/arm/mach-imx/mach-pca100.c | 8 ++++---- .../arch/arm/mach-imx/mach-pcm037.c | 8 ++++---- .../arch/arm/mach-imx/mach-pcm043.c | 8 ++++---- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-cpuimx27.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-cpuimx27.c index d085aea..dbbb970 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-cpuimx27.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-cpuimx27.c @@ -233,18 +233,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init eukrea_cpuimx27_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", eukrea_cpuimx27_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-cpuimx35.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-cpuimx35.c index 6450303..7d4dc14 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-cpuimx35.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-cpuimx35.c @@ -141,18 +141,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .workaround = FLS_USB2_WORKAROUND_ENGCM09152, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init eukrea_cpuimx35_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", eukrea_cpuimx35_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-cpuimx51sd.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-cpuimx51sd.c index 1e09de5..cd40bab 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-cpuimx51sd.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-cpuimx51sd.c @@ -217,18 +217,18 @@ static const struct mxc_usbh_platform_data usbh1_config __initconst = { .portsc = MXC_EHCI_MODE_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init eukrea_cpuimx51sd_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", eukrea_cpuimx51sd_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-eukrea_cpuimx25.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index d1e04e6..77a9edd 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-eukrea_cpuimx25.c @@ -109,18 +109,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .workaround = FLS_USB2_WORKAROUND_ENGCM09152, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init eukrea_cpuimx25_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", eukrea_cpuimx25_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx27_3ds.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx27_3ds.c index c6d385c..cc4f83c 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx27_3ds.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx27_3ds.c @@ -241,18 +241,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init mx27_3ds_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", mx27_3ds_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx31_3ds.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx31_3ds.c index 4eafdf2..ebcadd2 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx31_3ds.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx31_3ds.c @@ -671,18 +671,18 @@ static const struct fsl_usb2_platform_data usbotg_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init mx31_3ds_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", mx31_3ds_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx35_3ds.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx35_3ds.c index 28aa194..af92e5e 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx35_3ds.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx35_3ds.c @@ -540,18 +540,18 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { .portsc = MXC_EHCI_MODE_SERIAL, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init mx35_3ds_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", mx35_3ds_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx51_babbage.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx51_babbage.c index dde3970..3ca6902 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-mx51_babbage.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-mx51_babbage.c @@ -307,18 +307,18 @@ static const struct mxc_usbh_platform_data usbh1_config __initconst = { .portsc = MXC_EHCI_MODE_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init babbage_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", babbage_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-pca100.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-pca100.c index 541152e..9fe7a1b 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-pca100.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-pca100.c @@ -298,18 +298,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init pca100_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", pca100_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-pcm037.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-pcm037.c index 0a40004..debc286 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-pcm037.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-pcm037.c @@ -557,18 +557,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_ULPI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init pcm037_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", pcm037_otg_mode); diff --git linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-pcm043.c linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-pcm043.c index 73585f5..a8f4a00 100644 --- linux-next-HEAD-c90e5d2.orig/arch/arm/mach-imx/mach-pcm043.c +++ linux-next-HEAD-c90e5d2/arch/arm/mach-imx/mach-pcm043.c @@ -330,18 +330,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .phy_mode = FSL_USB2_PHY_UTMI, }; -static int otg_mode_host; +static bool otg_mode_host __initdata; static int __init pcm043_otg_mode(char *options) { if (!strcmp(options, "host")) - otg_mode_host = 1; + otg_mode_host = true; else if (!strcmp(options, "device")) - otg_mode_host = 0; + otg_mode_host = false; else pr_info("otg_mode neither \"host\" nor \"device\". " "Defaulting to device\n"); - return 0; + return 1; } __setup("otg_mode=", pcm043_otg_mode);