Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089AbbKYOO1 (ORCPT ); Wed, 25 Nov 2015 09:14:27 -0500 Received: from m50-133.163.com ([123.125.50.133]:39965 "EHLO m50-133.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432AbbKYOO0 (ORCPT ); Wed, 25 Nov 2015 09:14:26 -0500 From: Geliang Tang To: Sekhar Nori , Kevin Hilman , Russell King Cc: Geliang Tang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ARM: davinci: fix a problematic usage of WARN() Date: Wed, 25 Nov 2015 22:13:13 +0800 Message-Id: <50fd45fb78403b66381569a8c9ada6b17433e2d9.1448460525.git.geliangtang@163.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <12268783.CeI9Q9YHFN@wuerfel> X-CM-TRANSID: DdGowEBJ60EAwlVWFkrwAg--.690S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7Zw4Dtryrury3Kw47uF4kZwb_yoW8Ar15pa yj93yvkr47Ca4fCFyUZF18Zw1UCanrGwnF9345ua18Ww4xuryjv3Wft3W5Z3WrGrW8t3yr ZFnIk3Z3Xa9rZFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07Uk5rcUUUUU= X-Originating-IP: [116.77.146.156] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiNQO9mVSIKW4WIQAAs+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1833 Lines: 51 WARN() takes a condition and a format string. The condition was omitted. So I added it. Signed-off-by: Geliang Tang --- Changes in v2: - remove __func__ in WARN() --- arch/arm/mach-davinci/board-dm355-evm.c | 4 +--- arch/arm/mach-davinci/board-dm355-leopard.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index c71dd99..3c79796 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -384,9 +384,7 @@ static __init void dm355_evm_init(void) dm355evm_dm9000_rsrc[2].start = gpio_to_irq(1); aemif = clk_get(&dm355evm_dm9000.dev, "aemif"); - if (IS_ERR(aemif)) - WARN("%s: unable to get AEMIF clock\n", __func__); - else + if (!WARN(IS_ERR(aemif)), "unable to get AEMIF clock\n")) clk_prepare_enable(aemif); platform_add_devices(davinci_evm_devices, diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index 680a7a2..627ba89 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c @@ -242,9 +242,7 @@ static __init void dm355_leopard_init(void) dm355leopard_dm9000_rsrc[2].start = gpio_to_irq(9); aemif = clk_get(&dm355leopard_dm9000.dev, "aemif"); - if (IS_ERR(aemif)) - WARN("%s: unable to get AEMIF clock\n", __func__); - else + if (!WARN(IS_ERR(aemif)), "unable to get AEMIF clock\n")) clk_prepare_enable(aemif); platform_add_devices(davinci_leopard_devices, -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/