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 52848C433EF for ; Thu, 16 Dec 2021 22:09:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A078983045; Thu, 16 Dec 2021 23:09:17 +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="KdnH9g/P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6CB8282EBB; Thu, 16 Dec 2021 23:09:15 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 32A458304B for ; Thu, 16 Dec 2021 23:09:12 +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=kabel@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 dfw.source.kernel.org (Postfix) with ESMTPS id 2C0A761F9A; Thu, 16 Dec 2021 22:09:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60913C36AE7; Thu, 16 Dec 2021 22:09:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639692548; bh=i3FVxqL1PINrHJ7HHDQZmRAxrKjM851X4Ubh3YuSslk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KdnH9g/PqLsT41wlmQPaez9/20+rfS1VFmc3IxYzQeebJHvc/rX6TLv400lKbxUcV GOyHw+jAzeQtANOSj1LM7lZaOEPlydLM+Qu5x2/uXjWT3HRTrr+3bMGGNMSHwnnxnK GIwk5A2oeHA8oAt7X2KhMDgZ4NFBPi7eEftBoB9h0iQsJq4HDP1d7LJ+vQz+zqTsTo 1Oz5lddDiSCszLcDNy4vAAGTWfM195PYC6F0+S2DYHJ28rwekbMrc8cfYjmX5JivT0 me++/2II7f+CxvCpvaDrz8k/DjJaEBXl1ZeyygYw6rTqDZVbImMSl3A2ywY/91juWw J2/tuXv2CFZcQ== Date: Thu, 16 Dec 2021 23:09:03 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Stefan Roese , u-boot@lists.denx.de, Marek =?UTF-8?B?QmVo?= =?UTF-8?B?w7pu?= Subject: Re: [PATCH u-boot-marvell v2 8/9] arm: mvebu: spl: Use IS_ENABLED() instead of #ifdef where possible Message-ID: <20211216230903.2e8e37f7@thinkpad> In-Reply-To: <20211216181640.c3aolyfege4675ib@pali> References: <20211126143738.23830-1-kabel@kernel.org> <20211126143738.23830-9-kabel@kernel.org> <20211214093600.e2sy5yrtpz7gvfna@pali> <20211214104515.2ae03d0d@thinkpad> <20211214111234.ie54zex6veoirfam@pali> <20211214134536.2baeb2a0@thinkpad> <6cf901fd-01d7-6461-18e4-b362a37bac7c@denx.de> <20211214140104.7a410847@thinkpad> <20211216181640.c3aolyfege4675ib@pali> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Thu, 16 Dec 2021 19:16:40 +0100 Pali Roh=C3=A1r wrote: > The reason that it currently works is just because > gcc compiler does not do all checks before doing optimizations and so it > currently does generate any errors or warnings. Compiler cannot currently check this, only linker, because the function is always declared in mvebu's cpu.h. See https://lore.kernel.org/u-boot/20211214134536.2baeb2a0@thinkpad/ where I also proposed empty static inline implementations for non-A375 platforms, but Stefan thinks it's not an issue currently, because it does not cause any regressions, I guess. U-Boot's build system currently does not allow for -O0, you can choose only -O2 or -Os. We can always add empty static inline implementations into mvebu's cpu.h when it becomes an issue, or you can send a patch now, if you want a completely perfect code ASAP. But note that for that you'll need to check other functions there, as well. (If you look at https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-mvebu/in= clude/mach/cpu.h there are functions declared, without guarding #ifs, for all mvebu platforms: A3k, A7k, A37x and A38x.) Marek