Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbbKYNlT (ORCPT ); Wed, 25 Nov 2015 08:41:19 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:62927 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbbKYNlR (ORCPT ); Wed, 25 Nov 2015 08:41:17 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Geliang Tang , Sekhar Nori , Kevin Hilman , Russell King , linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] ARM: davinci: fix a problematic usage of WARN() Date: Wed, 25 Nov 2015 14:39:44 +0100 Message-ID: <12268783.CeI9Q9YHFN@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <06d69890c56bd84a831a1dccee26e34b4988a241.1448456395.git.geliangtang@163.com> References: <86c73f180d3054c1bf17bdac8c89026209167c9b.1448456395.git.geliangtang@163.com> <06d69890c56bd84a831a1dccee26e34b4988a241.1448456395.git.geliangtang@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:7gHZY2pcIZGf+4KJzmremDxKJHNIFGC7cQNHLbxD2OPiCasqDWD HwmxLEMR4kzyL/Af0zb2GJoS2Eex01o1cPvZ4XCMm6k8dxIZkkymoNba4xYmGbBaJrvdwA2 coShZavNH5bG3Vb3XoJtosVAqOwAcjjzeBwgqhASkj73Kz8MlE5xW6rhNploUitxHm+GR7J RYNWs/mRdjMOySqCyVPeA== X-UI-Out-Filterresults: notjunk:1;V01:K0:wJflP/ZHrj4=:wGPQfS4NWflfncYVu2umQu PHp90w2alcZKmtb9nPGbbGBqE1BPE+olOp6yer7QZrXverV+EugC+hrbyEYoYjoC5wU9ZL+Oa 9sNaghY2qi10YUDt9Iu2TPBthEtpbxLgw7AVEZ0wsjnPQS4G6KRogiIsf7I2DQr2rBJRzuuqr TD5Wqe5BKCJjeUkRlN83HrUWawXlVeWT9sqAs1WE1+RpzR5GKrYhuJ/hyZT6825ggr/eOhPJK 9qrzobi711qTvCx4gEPRzxiHR44i5bYzsnUItAWJ8MdADJjAK/KYPQAaBc0Lb82UslwLk/dYS ng947FEgqj20JxSeDdIQ75QiVlGGeWnIGGWpRZpVEAwMU32H8iGWR9y0yBxrK/59D9gReeSI6 FiLVroG7zM8YUPQGJz3lvPMgxO3M/pA8QJlbfWJ5AbgQmcV7sbar9n26lTqmSIRCtNvNEJ4Ur O2aE7IVRe4MSSeYt4bQ9EC3dpOD6nGPgsk9T9U0eyimy6691mWditR3vBlAnA2fi5Q4FIJ4B+ h2g1E1IU+QhzbZFxSXeRPsLOB7kqIXOsDTKtk0cIDSFrMLtUbQHUDdfGt2uYPIyvEAj1t+JV1 /iTqPWSvZ3XoxvhoxFK029lHe55v2kp93keJYrl1h3cNwoJDvONRcjTWeM3MLK5wmvBBbOdVL 67fNtmkAHhfqyf+H54xGs8V4Plq0OoiUB7WdnEhdW9sboFOKSao2T3aHQW2OJF6XtTF7z8i3u iHRzf/4wFTU+h2Pf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 938 Lines: 27 On Wednesday 25 November 2015 21:12:19 Geliang Tang wrote: > +++ b/arch/arm/mach-davinci/board-dm355-evm.c > @@ -385,7 +385,7 @@ static __init void dm355_evm_init(void) > > aemif = clk_get(&dm355evm_dm9000.dev, "aemif"); > if (IS_ERR(aemif)) > - WARN("%s: unable to get AEMIF clock\n", __func__); > + WARN(1, "%s: unable to get AEMIF clock\n", __func__); > else > clk_prepare_enable(aemif); > > How about writing this as if (!WARN(IS_ERR(aemif)), "unable to get AEMIF clock\n")) clk_prepare_enable(aemif); Note that WARN() already contains file and line, so you don't really need the __func__ here either. Arnd -- 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/