From patchwork Thu Mar 22 21:53:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 132312 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1376147ljb; Thu, 22 Mar 2018 14:53:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELsiqOiePgEFea/PcV1ot5lfZvgE/ksXO6wq2f1AmnlAHC066jRlpUbzPLrjYVfbCtJ2Izy8 X-Received: by 10.80.171.73 with SMTP id t9mr27421829edc.170.1521755639619; Thu, 22 Mar 2018 14:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521755639; cv=none; d=google.com; s=arc-20160816; b=CsjktbGT+BmOiijcUM75XTD5rmCVr0hz869HuMf0wjGERZgW4hXn+Nz0eN75TVxJsF eQLNRx8QZPXAaOWU1GFRdpTWbUWzSf7PXwQ10DTLOMQUE1x9daU3SH0hzX9QrJX7eVn4 QiBtBgQ8YiEV9nZFLNlIbdc2CyRSc2LQTMXk0HrI3XgXkYEab+iV3bHT9mr9EFTM3++i 18LDXg5WOD/N5UCLOG4nSweqnBm09V5z15SZFg+iV/SWEgNL9/mpoF34oZ+vnwAwSOCT /eJSenoL2Fp8DUQnWm8FCwOjP0NH6HrAB9361KxO6jM92z3KM1nftbt4O1yi/hwaf4ni USGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:arc-authentication-results; bh=FrM/a5J2v/xwW0wUCAzDsZnpmj7pyBz6WIWCjCsSK4s=; b=cONiY7Gvtbero4VfKTX8Z9TmGszzlkWb8k8Y1D0clvhMJcE6JENAJNJQxcW6oKO9q7 AXdSWA7tLZwP2B7P3XlCCeHeGIV3kC6GCFLzwkpGGpHtekPVq0AZKwOi9yCByb+5oaFn 5Z0leZPPg+7yzJrAAyk5SZTT6k1gMHla8cGhw5Mk6UEXH8CMK7JdNTfJAfFYjZCUF+Pj MyXgMwAkI56DaDviW5LGI0LjH1UxwRVZAUzLildaP/goR3ybKR1WTatj6+VLUfJRhEwC l2llLYBsl1VHnPpdw6yyWO3ah8NbYX887+0v43UHHJ4uCrVCiZNtiWHPTu0frrcLg5Am NKCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id g1si6408111edh.384.2018.03.22.14.53.58; Thu, 22 Mar 2018 14:53:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: by lists.denx.de (Postfix, from userid 105) id 71BB8C21E02; Thu, 22 Mar 2018 21:53:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5750BC21C6A; Thu, 22 Mar 2018 21:53:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 90F38C21C8B; Thu, 22 Mar 2018 21:53:53 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lists.denx.de (Postfix) with ESMTPS id 15457C21BE5 for ; Thu, 22 Mar 2018 21:53:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sjoerd) with ESMTPSA id 79B42270024 Received: by beast.luon.net (Postfix, from userid 1000) id 670113E2302; Thu, 22 Mar 2018 22:53:50 +0100 (CET) From: Sjoerd Simons To: u-boot@lists.denx.de Date: Thu, 22 Mar 2018 22:53:50 +0100 Message-Id: <20180322215350.3631-1-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.16.2 MIME-Version: 1.0 Cc: Jorge Ramirez-Ortiz , Maxime Ripard , Fiach Antaw Subject: [U-Boot] [PATCH] env: Properly check for BLK support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Use CONFIG_IS_ENABLED to see if CONFIG_BLK is enabled. Otherwise SPL compilation breaks on boards which do have CONFIG_BLK enabled but not DM_MMC for the SPL as follows: env/mmc.c: In function ‘init_mmc_for_env’: env/mmc.c:164:6: warning: implicit declaration of function ‘blk_get_from_parent’; did you mean ‘efi_get_ram_base’? [-Wimplicit-function-declaration] if (blk_get_from_parent(mmc->dev, &dev)) ^~~~~~~~~~~~~~~~~~~ efi_get_ram_base env/mmc.c:164:29: error: ‘struct mmc’ has no member named ‘dev’ if (blk_get_from_parent(mmc->dev, &dev)) ^~ Signed-off-by: Sjoerd Simons Reviewed-by: Simon Glass --- env/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/mmc.c b/env/mmc.c index 6f11deccb1..bf7015cd14 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -158,7 +158,7 @@ static const char *init_mmc_for_env(struct mmc *mmc) if (!mmc) return "!No MMC card found"; -#ifdef CONFIG_BLK +#if CONFIG_IS_ENABLED(BLK) struct udevice *dev; if (blk_get_from_parent(mmc->dev, &dev))