From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B47CEC433F5 for ; Tue, 14 Dec 2021 09:36:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8A73882DF6; Tue, 14 Dec 2021 10:36:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="b37ZpUT1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CAC8582FD0; Tue, 14 Dec 2021 10:36:08 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 96BF4811BB for ; Tue, 14 Dec 2021 10:36:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 33599B81619; Tue, 14 Dec 2021 09:36:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDA90C34600; Tue, 14 Dec 2021 09:36:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639474563; bh=FlbUhxNSZdD8t/5X1S23qqvO7U2AnBTMSKTMTCCeVJ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b37ZpUT1afbtYbYk48GjEAvmBUGhozHRL0B8Wr9l00FqEwmzy33o8CGnOJXk7VgAd 3wrd4PBHIKepWAoVQpHCf/bxbAKyCgeO5jRMmDSdKuHFU43yj5l+SN+FTZe8tSGb85 +LHAXwKVKCb8P3K1k6Tiht/hWmEu6l3PvgZ4qZoCVdh+A1PFTGBxTlZD7pUrzOSOvu z7rv+bwtCLo7PeqNvaZaGsI0AFrkTFliddZ9dckcDpDiKjQsZSMcaSoHtLAZ/SUj+N gdDtyX6ofiNm5T9Aj0yGxBrAFHPwpus4Mg4K5W7ejhuTb2l/6be3qtQLbyybcuNOVt 7xloBy8N13/cA== Received: by pali.im (Postfix) id 808D8798; Tue, 14 Dec 2021 10:36:00 +0100 (CET) Date: Tue, 14 Dec 2021 10:36:00 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Marek =?utf-8?B?QmVow7pu?= Cc: Stefan Roese , u-boot@lists.denx.de, Marek =?utf-8?B?QmVow7pu?= Subject: Re: [PATCH u-boot-marvell v2 8/9] arm: mvebu: spl: Use IS_ENABLED() instead of #ifdef where possible Message-ID: <20211214093600.e2sy5yrtpz7gvfna@pali> References: <20211126143738.23830-1-kabel@kernel.org> <20211126143738.23830-9-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211126143738.23830-9-kabel@kernel.org> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Friday 26 November 2021 15:37:37 Marek BehĂșn wrote: > @@ -340,17 +333,17 @@ void board_init_f(ulong dummy) > timer_init(); > > /* Armada 375 does not support SerDes and DDR3 init yet */ > -#if !defined(CONFIG_ARMADA_375) > - /* First init the serdes PHY's */ > - serdes_phy_config(); > - > - /* Setup DDR */ > - ret = ddr3_init(); > - if (ret) { > - debug("ddr3_init() failed: %d\n", ret); > - hang(); > + if (!IS_ENABLED(CONFIG_ARMADA_375)) { > + /* First init the serdes PHY's */ > + serdes_phy_config(); > + > + /* Setup DDR */ > + ret = ddr3_init(); > + if (ret) { > + debug("ddr3_init() failed: %d\n", ret); > + hang(); > + } > } > -#endif As written in comment above there is no SerDes and DDR3 support for Armada 375 and therefore there is no serdes_phy_config() or ddr3_init() function. So this code needs not to be compiled at all and usage of #ifdef is correct here.