From patchwork Wed May 22 23:31:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 798193 Delivered-To: patch@linaro.org Received: by 2002:ab3:6414:0:b0:267:d849:ee76 with SMTP id j20csp918150lte; Wed, 22 May 2024 16:34:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWM2psmqLYQYTp3wqFRI4tSlMpwZkWq1ubjg7s0yXMCgPRzyFXiiQYxKbS1KArR0dVbokrHvivpq93fuSj76D1+ X-Google-Smtp-Source: AGHT+IGKrp6OvrEsRacee7maHNkDkUqeae7xqL621jcstBcrj+zl5jFzms4DTW9S/xHGtRgETnDf X-Received: by 2002:a50:d6ca:0:b0:570:369:3e06 with SMTP id 4fb4d7f45d1cf-57832a96712mr2072168a12.19.1716420862291; Wed, 22 May 2024 16:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716420862; cv=none; d=google.com; s=arc-20160816; b=ttTnFouPGOAGkVHeFVU9eJikVhYUZ6LFAYOzrUjbygCs2fc77eS/bkWhdJoHr4k6Gy pGjkcYSrkfHg1e8QeFzIFaPTDCCQHjAfypDaEFpY9S2xXz5cnzOSD/BcO5O4fbWN1gJh ylteIrsK3jirbuVj/1AxUCLGuZ89OaBbN6oZaF/6YcHZ3+FF1mtfakWKhuMkZ4hlzVIN hyqVQJZxBtDZ5wNzmVs8RS2N7f13lRlIYQPktdpYTQCSKhE9++86DhCIs3S7H1WVv30s ljlLj/jZb4gHAsy2Vn5+/e3QWZAPDLnp05b3juYaaH+gko0O/vwwj5wA4ku9l7xPskYD DxXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Im5kRYqjyNpmw7Qa9SARNYoYZaSzc8/1LwpQ1B6RgKM=; fh=lyHLgjGXDGpoWQjbgxqqgYap8/kvSpnYcmh+7DzEHTw=; b=dFW171i9NvFs73JEvofijEPa+TxTnaOgp6k+8ZLOoOSN9SLcgb+5TD2vSfR8VUtWNE 03ZrncGUfE4+ZaxEgM9GmOQi9WcxfQdyPRQiEwBO20LMzRw5BSO5VAwzNae+Kq/jxq5A 7eTDPSPgayRrQIArLBXwC3aQ7IDLZK7wPloi/q5v2ELTLrcWvHPcb/iAF5WXVvFysP/Q sHejDjZvmNsdHAFSuw19/7SgCyhV+0o8IMo5kPpJuSWatDTmDn26qgmVZDNEzio9tWPH K/8jUgPv9wgBt6D5vQHPooO24ULduuBIykBC87tMH6EZVDx3wD4hvMKrtja6aQLyrbIy 3hSQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pDF07FNh; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-578356a5dfasi1053440a12.681.2024.05.22.16.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:34:22 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pDF07FNh; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5F22588576; Thu, 23 May 2024 01:31:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.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=linaro.org header.i=@linaro.org header.b="pDF07FNh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4207F88545; Thu, 23 May 2024 01:31:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (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 78603884F1 for ; Thu, 23 May 2024 01:31:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6f0f728d373so3079778a34.0 for ; Wed, 22 May 2024 16:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716420707; x=1717025507; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Im5kRYqjyNpmw7Qa9SARNYoYZaSzc8/1LwpQ1B6RgKM=; b=pDF07FNh+e2KRb/O+Rg8gL5ilMlipPKtNIfQG8J7BusT1l81MewjIA4L9X+gznckhr K476Z//H4jrO//+q3T6sxcb5Tlvd00yBAdjgM1br9lXfdtFvntbpV0kofaa3lSMzALhV sb4FHqcvRWfT2Lqg+LtVbd3xxf79UjOm8P7iFu4jFnD+vlc9usPHiRAEmFdTFizHFCmP n4ge7J9pTQc1+cymdnimWlNczBxLaXumKOXY+PpFSy9Yy6tfMin2aVYygS4mnn938evW BhvzYDdC9J9xPTxVv5OBoZeP2lafXoIVTllOkBR5E4oyraFcHhd+cF4miPPzv1i+kck6 4nvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716420707; x=1717025507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Im5kRYqjyNpmw7Qa9SARNYoYZaSzc8/1LwpQ1B6RgKM=; b=SJ5wmF+EoKjS4LNjHS7oKKCV8TdzKxHau7t5Px7sh7KWTEbW97JVbbwWkCyb2aTyBt hAf67qHa5lGN5K3dyyEUdSK1FV1SF1p1bWvRvB0cQF9gE7BN9I4S8dZqVrd/KwOsCsR6 JbOFJLl2RWLKuy/z4yuFJz8twoMdYTcNNJmRkI/Z3Q6rQ32uHvO+CEgQJ6hF6pTJeUZJ Qr6OzHr6k66NJHq/1OsybA/Kf1mUNlUm2sdPf9LmCfq5LWey3eIX72dXXCQMU6zThASE +/LIpBZ7Tzt8UAOEwSgqQkfiYeTaTE67A/+aYzZFmOt8uXYVijb+ktQCgtZTzgTye3ey 5jbQ== X-Forwarded-Encrypted: i=1; AJvYcCWbjMn7Rtq3EJxpQPHtrlUwEQOHoD7WHhC95OLZ+vtwjFPTWKdX2QCXOSCDXCYXkAYKNdB/dSqC0I3zgn57tQqF/nHWZw== X-Gm-Message-State: AOJu0Yw9A1CQkGxOK3DCnkSwMU/IiTXX6itCZn9RC3iB2e9ZfnPYemBb Q1VhPYSzToK+975Ko7yjnvAvEHM7DX0FdR8amfznIjiD5onFkpzc9b9I/3VDork= X-Received: by 2002:a05:6830:1e32:b0:6f7:fd41:b60f with SMTP id 46e09a7af769-6f7fd41ddcamr351734a34.20.1716420707688; Wed, 22 May 2024 16:31:47 -0700 (PDT) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f137fa5d17sm2244071a34.76.2024.05.22.16.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:31:47 -0700 (PDT) From: Sam Protsenko To: Tom Rini , Minkyu Kang , Peng Fan , Jaehoon Chung , Simon Glass Cc: Philipp Tomsich , Kever Yang , Eugeniy Paltsev , Peter Robinson , Jonas Karlman , Yang Xiwen , Ferass El Hafidi , Sean Anderson , u-boot@lists.denx.de, uboot-snps-arc@synopsys.com Subject: [PATCH 14/42] mmc: dw_mmc: Use CONFIG_IS_ENABLED() to check config options Date: Wed, 22 May 2024 18:31:07 -0500 Message-Id: <20240522233135.26835-15-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240522233135.26835-1-semen.protsenko@linaro.org> References: <20240522233135.26835-1-semen.protsenko@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Use CONFIG_IS_ENABLED() macro to check config options as recommended by checkpatch, instead of checking those with just #ifdef CONFIG_... No functional change. Signed-off-by: Sam Protsenko --- drivers/mmc/dw_mmc.c | 6 +++--- include/dwmmc.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index a1f06931b7ac..ebe239547a7d 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -573,7 +573,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 freq) return 0; } -#ifdef CONFIG_DM_MMC +#if CONFIG_IS_ENABLED(DM_MMC) static int dwmci_set_ios(struct udevice *dev) { struct mmc *mmc = mmc_get_mmc_dev(dev); @@ -713,7 +713,7 @@ static int dwmci_init(struct mmc *mmc) return 0; } -#ifdef CONFIG_DM_MMC +#if CONFIG_IS_ENABLED(DM_MMC) int dwmci_probe(struct udevice *dev) { struct mmc *mmc = mmc_get_mmc_dev(dev); @@ -738,7 +738,7 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host, u32 max_clk, u32 min_clk) { cfg->name = host->name; -#ifndef CONFIG_DM_MMC +#if !CONFIG_IS_ENABLED(DM_MMC) cfg->ops = &dwmci_ops; #endif cfg->f_min = min_clk; diff --git a/include/dwmmc.h b/include/dwmmc.h index 77c8989148a1..9252bef24329 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -268,7 +268,7 @@ static inline u8 dwmci_readb(struct dwmci_host *host, int reg) return readb(host->ioaddr + reg); } -#ifdef CONFIG_BLK +#if CONFIG_IS_ENABLED(BLK) /** * dwmci_setup_cfg() - Set up the configuration for DWMMC * @cfg: Configuration structure to fill in (generally &plat->mmc) @@ -334,7 +334,7 @@ int dwmci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg); int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk); #endif /* !CONFIG_BLK */ -#ifdef CONFIG_DM_MMC +#if CONFIG_IS_ENABLED(DM_MMC) /* Export the operations to drivers */ int dwmci_probe(struct udevice *dev); extern const struct dm_mmc_ops dm_dwmci_ops;