From patchwork Wed Mar 19 19:29:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3860811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B9087BF540 for ; Wed, 19 Mar 2014 19:43:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8517201F4 for ; Wed, 19 Mar 2014 19:43:05 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E192B2010E for ; Wed, 19 Mar 2014 19:43:03 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMM5-00058m-0c; Wed, 19 Mar 2014 19:40:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQML5-0006Iy-7l; Wed, 19 Mar 2014 19:39:47 +0000 Received: from moutng.kundenserver.de ([212.227.17.13]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMEw-0005mU-Np for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 19:33:28 +0000 Received: from wuerfel.lan (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0MHG1D-1WMBT80HC7-00E8rF; Wed, 19 Mar 2014 20:30:33 +0100 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH 04/62] ARM: at91: fix broken "if () else" statement Date: Wed, 19 Mar 2014 20:29:01 +0100 Message-Id: <1395257399-359545-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395257399-359545-1-git-send-email-arnd@arndb.de> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:6oXj7B4rndHJhM4T/QqCiFyPqzRfjwv/OOAMnIzaRlj UILaNwdNW8fUCyC2dGH11hC3Qrpi4YXUM0Gz1cPBWADwrWZ9r4 JeAOapx9kmiKpAqxlsVGCAGlxFId6bAnE9+GQvl7B8xmCKzTkM CoizlbYh2kCN6ibllrTVQxnJJFzUDFPtEv5MMZlDsypSk/Fd7i t8pZKFjbl31weLe8yzE7Q+Le8WugGBy1BcsRKBpr9KxGPcBw2H ilo4e8XyWLkaO4ZZJwsffqDjiHmXLSStOwh23/BajW1YcZjXN/ hqvuTkL06Y5qkUZLnTk8vWDPHe7i6WSYKUbMyFnxC1pAy6L6DK MmCk/nTj7XYHnDhqpzsDU3v87V5OtF0JOe7OgY65A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_153327_030380_150A4940 X-CRM114-Status: GOOD ( 11.48 ) X-Spam-Score: -1.9 (-) Cc: Jean-Christophe Plagniol-Villard , Nicolas Ferre , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Andrew Victor X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_PATA_AT91 is disabled, the code in at91_add_device_cf is turned into invalid C statements due to the lack of an expression before the 'else' clause. This moves the first half of the condition inside of the #ifdef, which seems to be what the author intended. Signed-off-by: Arnd Bergmann Cc: Andrew Victor Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam9260_devices.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 2ae7715..4222a7d 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -1263,13 +1263,13 @@ void __init at91_add_device_cf(struct at91_cf_data *data) at91_set_A_periph(AT91_PIN_PC10, 0); /* CFRNW */ at91_set_A_periph(AT91_PIN_PC15, 1); /* NWAIT */ - if (data->flags & AT91_CF_TRUE_IDE) #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) + if (data->flags & AT91_CF_TRUE_IDE) pdev->name = "pata_at91"; + else #else #warning "board requires AT91_CF_TRUE_IDE: enable pata_at91" #endif - else pdev->name = "at91_cf"; platform_device_register(pdev);