From patchwork Tue Apr 19 01:01:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 563290 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp2858719map; Mon, 18 Apr 2022 18:03:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGeg9qS0AJ0Tnz5eqWERAognHqCw874ex8Q2RtWZMscRydrkbxCBtoinjUy3lZ36O59w9e X-Received: by 2002:aa7:c054:0:b0:41d:5276:a6c4 with SMTP id k20-20020aa7c054000000b0041d5276a6c4mr15121471edo.109.1650330207344; Mon, 18 Apr 2022 18:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650330207; cv=none; d=google.com; s=arc-20160816; b=W9kjP1hMWgakHBBMzwMNmNvHlH36YC0TatraPb7DJIh+/y/oHyk1PbOifgHU6U0shf 1wamMrNxhhLKfZvflnz7as7b78vc9LC85rVB/BFq91iIQXUpfcvyK5FlUEWaKYVmeOfG KVmu8+rwQpaszVGmqAOHcCyRmo9RyiWoA8tZpVyWZCPsw6Pq7mChMOh342fz59tVQ+4G r/OaaIGaO4eHFaZlbXEskuKtp8DhEbY3yMMREK9arm65QPb1+78qBBYxGV+Rc3MtMTEV mOZ/bykqv4K595lFAhJbz72/hoxseqdi/zryLLv8g6M7X0ccOHb62PKwaV8eON7ajPUn ahhw== 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=06b7W299bvOTgsq2GBFHEUZTL0z7w3yyEaq7vFkTHOA=; b=NpP0ySre9Vq9eBnPWUXRurMjTna1H436wH1xmPjvpfE/+dE3dQLsfeqNbv3ZYkWuFJ P/bJbgRJezHzQtUyjdJj3aa5/LyVEuXguZ9mXBrj7JcM2jnoM5soy+qccHHiTiF1Oy9u 4KD6HPRRaI1O21U/yNRSpGsI73w5qJdNcSR9tD5MU0N8GdtpNRpXyNXPuSKnvvDdztVV 16p1urvHv9SPohdeHR8bfuQUCrb2yZEGVwoz1dvJC8b+S9uwAY7g6TdceTMYoLusbxR6 hqSWJtdIh6urC3XK6jnIqcxVVRwgR35cAqDWrWPTFyS3OFsiug4E0oLCe4JRJIBq3fVo 7hsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=deTAtYGd; 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 m21-20020a1709060d9500b006e8c6590d22si7372201eji.265.2022.04.18.18.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:03:27 -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=deTAtYGd; 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 597B083BF6; Tue, 19 Apr 2022 03:03:10 +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="deTAtYGd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B646183B19; Tue, 19 Apr 2022 03:02:39 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 8479A83AFF for ; Tue, 19 Apr 2022 03:02:32 +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=takahiro.akashi@linaro.org Received: by mail-pl1-x636.google.com with SMTP id j8so13697919pll.11 for ; Mon, 18 Apr 2022 18:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=06b7W299bvOTgsq2GBFHEUZTL0z7w3yyEaq7vFkTHOA=; b=deTAtYGdzdx1EzqYhQrtue5HnHCU5FDYUoPK8izZNkPR2RRWTWjoJrsbBezYA9jAuO y7mX4A3z6IpgTYuOJsb00KJgoPxW7x/a9hNQNbGbMZ/dM8D3/NVDWB6882OkdwUwTdOx u83/FCWXd8TjsY/ReWII+KUzxU2Dl7wIQV8OKeTvwdc+AEsK8kVUzMCftwnZNyDtgpI4 OkXG9IqsgWTzT/M4Zdbw7JJl+nTksYThKn8u/OqQ5U+YIYV/sikIfobxFfnf9oA4dy9x FdoIK3HHC0Oxpyx/sJX/kjW/H8XuD7r9X6anbXM/PfdojgbtVFpNxurqJeVO+4RPp2iD sOBQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=06b7W299bvOTgsq2GBFHEUZTL0z7w3yyEaq7vFkTHOA=; b=eMQEApOUTOCegXVtkFY2t6QKtVvh1+PnqU/Pu7xuMFUkkdM60+hyrYgCWzBfZez1PK sZh/3qgihOd8z5el136Ko5ieP2aYx5fkfgT9Cq+nV9T1PhsqQ63Z0Gj9H5NKud++zZ+b Yjjzxt4nrNhPBrFwOyUH4HsxN7vy2JV8ipL3yYPOrIJWE3R8RPOwjb9WX50gio0PgvC4 3Z0T+ZjkeKr4eDZEg+04wTZbqXkE9RVSPfsRdpE92Q3aXIaGi959UVmMjNeRDEFt3L40 bR+x3q/aoG6en2xUGbkXzqnTLq6xbfq8c2gK47/Qv2tHmTFgZe0PmYhHCWuRHvJjtP8j zhpQ== X-Gm-Message-State: AOAM532bhg80mnYN/eDzX3xFfpprf30/BwlSefkTDtbFitdBc16uqNMJ 5W/Py87lDALJrKcfRKeOmyLdHw== X-Received: by 2002:a17:90a:3484:b0:1cb:59a0:f30b with SMTP id p4-20020a17090a348400b001cb59a0f30bmr15726849pjb.92.1650330150897; Mon, 18 Apr 2022 18:02:30 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:5858:d3a6:5cad:ceeb]) by smtp.gmail.com with ESMTPSA id l2-20020a056a0016c200b004f7e3181a41sm14791729pfc.98.2022.04.18.18.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:02:30 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org, xypron.glpk@gmx.de Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH 3/7] disk: define nullified functions for !PARTITIONS Date: Tue, 19 Apr 2022 10:01:54 +0900 Message-Id: <20220419010158.47034-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220419010158.47034-1-takahiro.akashi@linaro.org> References: <20220419010158.47034-1-takahiro.akashi@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.5 at phobos.denx.de X-Virus-Status: Clean Some defconfig enables CMD_PART even if none of any partition table types (CONFIG_*_PARTITION) are enabled. This will lead to the size growth in SPL/TPL code since disk/part.c will be compiled in any way. We will change disk/Kconfig later so that CONFIG_PARTITIONS is only enabled when, at least, one of CONFIG_*_PARTITION is enabled. To make the build work (in particular, "part" command) correctly, a few functions should be defined as void functions in case of !CONFIG_PARTITIONS. Signed-off-by: AKASHI Takahiro --- include/part.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/part.h b/include/part.h index 9975fad97121..5f47a76bc19b 100644 --- a/include/part.h +++ b/include/part.h @@ -276,6 +276,15 @@ static inline int blk_get_device_part_str(const char *ifname, struct disk_partition *info, int allow_whole_dev) { *dev_desc = NULL; return -1; } +static inline int part_get_info_by_name_type(struct blk_desc *dev_desc, + const char *name, + struct disk_partition *info, + int part_type) +{ return -ENOENT; } +static inline int part_get_info_by_name(struct blk_desc *dev_desc, + const char *name, + struct disk_partition *info) +{ return -ENOENT; } static inline int part_get_info_by_dev_and_name_or_num(const char *dev_iface, const char *dev_part_str,