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 3C747C433EF for ; Sun, 26 Dec 2021 17:23:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD1D183041; Sun, 26 Dec 2021 18:23:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="Kd2dyCUv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7EC7E8141E; Sun, 26 Dec 2021 18:23:19 +0100 (CET) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 86B5283468 for ; Sun, 26 Dec 2021 18:23:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tomm.merciai@gmail.com Received: by mail-ed1-x52c.google.com with SMTP id o6so53372845edc.4 for ; Sun, 26 Dec 2021 09:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GQIvEwGbs0Ni54Cwb8/LZftJwfbqTdOHAv3VkbszVYI=; b=Kd2dyCUvYPXiZck1sbDaWFrvS2gUa/ltxXJRxYYPZ6yX84Rf7g3sASvhNFFOEtbvB7 +mzI/mXmGcETf45H3lmTKKm2H+qHz07Y0C3G1iC68/wx55LsWtA7ybjCj41E62FVbo/6 ILuwHHnL7RziauJJUMt4PHEX0TZ8/4EXO9jGtxzl14/nPBMAe58AJXXlSCCo/2Skn8FT ubMw7OwZovZy72qU9cKsD518yZKrcu/XHXfzEqJwFccwkOPVShgy+1oKBUV9NxdWDNE/ box5Y+1Ezt0bis6akvfm2c5Di/p9s+Y526mnY2ottC6mY4blR3YjwIuoix0mv+KdCE8r H+vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GQIvEwGbs0Ni54Cwb8/LZftJwfbqTdOHAv3VkbszVYI=; b=efwbYrzxaYMd8xk7eqgLWQJtTCi9cLvY8Tsn7IPPwzYQE1BYITScjH9e++O9JBXgUT L+J8u7e2ncwMapOYDTEFueE2YmOLccewcuGhO02gA6GlWceCNHS15udA73vt1costsj2 hDnXVG+x0caY73ldbiY8pXZ7ykzV0Ez6Btbv7KHsTT51D0spkCDpxza6Dy3PpK28foNP 973lDThM5xMT4gYtHWw4RskQ2GiMv3R6hWUG8PjusGo8fKqZMsvgnElXL+s3WoIVIVRN YancNoBJt77NAM4odVfQg0VjXh/PRUQ2T+FFaUC23zThxO7Sl3r6lfs1zdrjBR+73Lrq qBhw== X-Gm-Message-State: AOAM53268PP7vxo+yXMS7eNN6FVNUrOr+oczp5qSbCID7/nHQtDw69pQ fnHRmt00urnODwkAmIs3SGE= X-Google-Smtp-Source: ABdhPJxav11P6HpnWBi5Ft2/5xW75FBdMnBUhGcX9XSPj+Bd+jZMygM0nXyW1Po4GhMti+L9hX0iOQ== X-Received: by 2002:aa7:d546:: with SMTP id u6mr13190531edr.311.1640539395156; Sun, 26 Dec 2021 09:23:15 -0800 (PST) Received: from tom-desktop.station (net-93-71-218-227.cust.vodafonedsl.it. [93.71.218.227]) by smtp.gmail.com with ESMTPSA id f13sm146509ejf.53.2021.12.26.09.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Dec 2021 09:23:14 -0800 (PST) From: Tommaso Merciai To: Cc: tomm.merciai@gmail.com, linuxfancy@googlegroups.com, Peng Fan , Stefano Babic , Fabio Estevam , "NXP i.MX U-Boot Team" , u-boot@lists.denx.de Subject: [PATCH] freescale: imx8mm_evk: Use IS_ENABLED instead of #ifdef Date: Sun, 26 Dec 2021 18:23:11 +0100 Message-Id: <20211226172311.176475-1-tomm.merciai@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Use IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG) to make the code more readable and fix checkpatch.pl warning Signed-off-by: Tommaso Merciai --- board/freescale/imx8mm_evk/imx8mm_evk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c index ab55135a97..e0975fcda7 100644 --- a/board/freescale/imx8mm_evk/imx8mm_evk.c +++ b/board/freescale/imx8mm_evk/imx8mm_evk.c @@ -60,9 +60,10 @@ int board_mmc_get_env_dev(int devno) int board_late_init(void) { -#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - env_set("board_name", "EVK"); - env_set("board_rev", "iMX8MM"); -#endif + if (IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) { + env_set("board_name", "EVK"); + env_set("board_rev", "iMX8MM"); + } + return 0; } -- 2.25.1