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 A05C4C636D6 for ; Wed, 22 Feb 2023 15:07:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C412085AE0; Wed, 22 Feb 2023 16:07:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="IsXrY3XY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E103985AE1; Wed, 22 Feb 2023 16:07:06 +0100 (CET) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E1FAA85ADA for ; Wed, 22 Feb 2023 16:07:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x831.google.com with SMTP id w23so7863890qtn.6 for ; Wed, 22 Feb 2023 07:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=z7v5qPRdtr0U3OoawmyrUlolpAJB+fqUQ6/kOH0UwKI=; b=IsXrY3XYVo7EjfsjJtoz0DcZEGVwhUSGpxsD0VqXEWR9mJzwKOr/QOVrtc7WHVygDp a4/eZrk8qsoFdJyVKNVT/e1CRLPt+KCje0wZIX0uOgQikItwLKKB9obSaf1WPCEc4eGC xyTsxBIY3T+Mz9tfi3POSX4BAPwXd5OTstK2k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=z7v5qPRdtr0U3OoawmyrUlolpAJB+fqUQ6/kOH0UwKI=; b=6QcUNv3Mx5bjaIVCwmO+HrQrpH048cQZCInevAapOwwAh7p+TbQQ/U/exCbcZC6BxS Q6tCu83SJQgnpuWKyQxu/GSm+j+rmdmINe+yJ7nkz8PbQHQIDvvu0+5M8uW0BmFJib6o XGbwTRX3rWJH3BAbxzR8gx0u37qWW30dwGpSmiuglJuRnALuYtyH4FDRZ1TLhVuhisC3 B/CGck+rxDZypypbyL9ptqmeVHK7mz9h0F+wvU6utuP51yPlyz0EixNp9BroTsd6q+wQ NjU/mZhFZbQue9aok4klblNjz4V5h1Z+TrZ5345GikIEBUGUi8Puss7qkPF6+YnIzJKV UX6w== X-Gm-Message-State: AO0yUKUPeAOLDKloUdgwZzI8Dhbd2yl7gvZZRyhpxmoLdHIIK7HkfabQ ADW1s+BkfLjSeNoU5xpZbhpFXg== X-Google-Smtp-Source: AK7set84pzz2RgIO8GSOYFA1NV8j5ceJ36Ff4R6NW+VKaS/saGmtkuDMNNvBiZWfx/dExfbW1PVOZA== X-Received: by 2002:a05:622a:1343:b0:3bd:1914:3c69 with SMTP id w3-20020a05622a134300b003bd19143c69mr13694121qtk.7.1677078422661; Wed, 22 Feb 2023 07:07:02 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-0ab3-6707-0dcf-7989.res6.spectrum.com. [2603:6081:7b00:6400:ab3:6707:dcf:7989]) by smtp.gmail.com with ESMTPSA id s75-20020a37a94e000000b0073d873df3fesm6882115qke.30.2023.02.22.07.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 07:07:02 -0800 (PST) Date: Wed, 22 Feb 2023 10:07:00 -0500 From: Tom Rini To: Troy Kisky Cc: sjg@chromium.org, u-boot@lists.denx.de, gary.bisson@lairdconnect.com, Tim Harvey Subject: Re: [PATCH v1 21/24] gateworks: venice: surround call of setup_fec with if IS_ENABLED(CONFIG_NET) Message-ID: References: <20230222013821.1144691-1-troykiskyboundary@gmail.com> <20230222013821.1144691-22-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VvicyKw1hvI4ppg3" Content-Disposition: inline In-Reply-To: <20230222013821.1144691-22-troykiskyboundary@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean --VvicyKw1hvI4ppg3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 21, 2023 at 05:38:18PM -0800, Troy Kisky wrote: > This is the same as the definition is surrounded by. > It avoids an error in converting to CONFIG_IS_ENABLED(NET). >=20 > Signed-off-by: Troy Kisky > --- >=20 > board/gateworks/venice/venice.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/ven= ice.c > index c4d86c26a9b..ad27835caaf 100644 > --- a/board/gateworks/venice/venice.c > +++ b/board/gateworks/venice/venice.c > @@ -41,7 +41,7 @@ int board_fit_config_name_match(const char *name) > return -1; > } > =20 > -#if (IS_ENABLED(CONFIG_NET)) > +#if IS_ENABLED(CONFIG_NET) > static int setup_fec(void) > { > struct iomuxc_gpr_base_regs *gpr =3D > @@ -113,10 +113,12 @@ int board_init(void) > { > venice_eeprom_init(1); > =20 > +#if IS_ENABLED(CONFIG_NET) > if (IS_ENABLED(CONFIG_FEC_MXC)) > setup_fec(); > if (IS_ENABLED(CONFIG_DWC_ETH_QOS)) > setup_eqos(); > +#endif > =20 > return 0; > } We should be able to not-guard setup_fec (and setup_eqos), as if (IS_ENABLED(...)) will lead to the compiler optimizing it all away, but if (0) { func() } shouldn't result in unused function warnings. --=20 Tom --VvicyKw1hvI4ppg3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmP2L5QACgkQFHw5/5Y0 tyxoyQv8Dwj/MLd2Mc4V4XrJ8KjZtfvVCBA8wa9FmgfTeOXzu3ql6W4VVDAcQys6 4ElcBK2tQRL1ka6sncuYdC1hNWdnXcunjcD4jmbquaANvOhcQYnU6DsVrNIy4dsp +xv1Mkl61/J023wYWWsVqQiCbc2IFYaYCCKwddhq4FH7ymgsCiGpchiVcVZSd115 NiW/050uaAjwcan5shk5G94J2dEThcZXNKgIXOYeKAObXGnoqNgXiCRe8m7AST8i F+RhrXp3KS6gmTSw5eKcOD43B8Z9h5PswhLfN2W80mRae9qEa2DXXpen+JOu6/sq DkTZX87vqLkttNMqTLBCLcggIYKh2F6MUQqZEaY3FblQw+ApoKJcty7CHfhQoLbL 5TIQ4Q1LCWLTDbp8HXQ8W72vaCpJWCMIlbrKzZkqJtuh4WgAc/UgIi+dKFwOsCTd Vg2LCWyHrG/6IusymfYkC5Kp1i+z/0n6cAFTpuHUoJpJ1JzS9QuzUM+bci6HngWN U2V0YswM =9RPW -----END PGP SIGNATURE----- --VvicyKw1hvI4ppg3--