From patchwork Fri Oct 1 05:01:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 514978 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp450596jaf; Thu, 30 Sep 2021 22:03:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMyNuojIBH/DHX7V4nT6+YV0xPwKh8HkVDoOzym5uHmPgXxvp8hDrGM6fnsa6FkEz4q7m5 X-Received: by 2002:a17:906:5051:: with SMTP id e17mr3834213ejk.481.1633064582061; Thu, 30 Sep 2021 22:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633064582; cv=none; d=google.com; s=arc-20160816; b=sZeuSWafhqauLARjB0szetkH029y9wT5B9w7cji9CwPrH9pL+fpCq56cGEZb5AURmr iC8qW09E8+3jAx1E9kSzbgPF5XEuFdhs+v5owpnsR3KP2ppyZn571gyT0pNjdHW7YX99 8y6kRRD5SsyJ6GjEp1qXxk1wlq5qjND0R9HRotsUVa/zfnICJc+H/FDOU9y/APhrLRZ/ tRD/wfPEQ5WHI7bTDaAe8i0tJ3j572uU9eeOVU60Cr9cpC7uaY6LjWc/qNEaGXXoHBn6 0ZXLQYIHaVC4/GGlMAxgPno13ntgkIkUSn24Wrol/jS5kjRve6hum8EpVno94cn3PAh+ ugkw== 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=AnfPfV+cavYk3G8dtEDjlVGQ1nDZUEBohAoM7azohRM=; b=D5Y87lvvr+dQJNJt74OItpVToTFiH/P/8SurlGOW2unA9sUAEDGO4RFeWo3ICnDhEf zKLlT/PFNI0r79b2FsAsk134pWTJjL6S5Wh8yKq5xYcNju+EiFlrrJ3/2WbZSdokb88b iWoK0ubIkGnOT90+rHjb6wq9+MqHkIKz9Z9m6GJ+0+dD1RMAYv8SDBmER/k02bIwZzCR kkc2JAp4VkQQ1tuS2w0um7mcXX2z14hsvzCUAXH9ZADVRCBaR8II8uj0HwI11smwl+Ks KYlg75AETB5RLLZ9pj4Ab0BSoVChHvdGLpteMtIMSYnVHqf7pGfEf88JLLoJHiirF7Py YKAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sDAMdCNP; 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 v8si5370099ejv.188.2021.09.30.22.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:03:02 -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=sDAMdCNP; 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 95F89820ED; Fri, 1 Oct 2021 07:03:00 +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="sDAMdCNP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 348D182006; Fri, 1 Oct 2021 07:02:57 +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-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (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 548CD81E1C for ; Fri, 1 Oct 2021 07:02:52 +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-pj1-x102e.google.com with SMTP id na16-20020a17090b4c1000b0019f5bb661f9so2601701pjb.0 for ; Thu, 30 Sep 2021 22:02:52 -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=AnfPfV+cavYk3G8dtEDjlVGQ1nDZUEBohAoM7azohRM=; b=sDAMdCNP8F679DlE+QmytiifOnQPkhr3OA/HmaAeyZAZQu63Oe+SGLaboc8aSbfChT FRac1F/6mA+1l5hlFv0oEY6le7ZiQ1XlXO90NHLHm4HLXJiwByV5yhoGHuVHTbXK3qxt kvsU3DjMipiGu3igf40rvkCRJCT8MYq8ijfFiUevAkzJZJoLDDhnCUBcI9l589s51IKz DWUMKJLmseTzXsNOz69EyokVeIFPl578E1n+gUOeNzMvC0ErsF/CEW6bOuImMVEspsyy 0uK36KEa3T1NfBQgN/vIE+ha+wR8/xnkDOBgR9tQgV9BBE+Gk5yDM+eyMi5oFYp3xwvW aOJA== 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=AnfPfV+cavYk3G8dtEDjlVGQ1nDZUEBohAoM7azohRM=; b=5r7SuAuIZnuyiRCEh+d6bfNB7i39imjM/TNIclPEl1n79qAo1rTsWBuAxxQZSbJtZj sYYU4eNKqqE9r2PWUIs5uoE5U/hDcfo3fX1V9QgmrDxFAUficRAJ1CKncXxBd2v6bkOQ fjNiNr9R7pk1L4HzUmRk0WBGcC2U0yYdcCQxTJ0Fhz4yi6mJsGv5ySh1K3Z4CxtU1TvW kitGs5gHBDuwuJgr69dxOoJevXBa2dPgJaIccR9RACRv0OpfrbwRVR+Lg5LPXWH0pw8s x+afwIQjCOALx+FlwGKV9CClhD1xLb5G5EidWysQUozhc58IWsCnwpYjOuy4NIVaIDSW ZIAQ== X-Gm-Message-State: AOAM532aoa/zvZ8RGp8IoWlTLEf3HU9dg8OHSzNK8A9j50h1vBjwoWes u2jcFQI/65lmkDXb+z7mOc+geQ== X-Received: by 2002:a17:90b:4c4d:: with SMTP id np13mr382014pjb.193.1633064570507; Thu, 30 Sep 2021 22:02:50 -0700 (PDT) Received: from localhost.localdomain (122-100-26-52m5.mineo.jp. [122.100.26.52]) by smtp.gmail.com with ESMTPSA id z8sm4615113pgc.53.2021.09.30.22.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:02:50 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC Date: Fri, 1 Oct 2021 14:01:45 +0900 Message-Id: <20211001050228.55183-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001050228.55183-1-takahiro.akashi@linaro.org> References: <20211001050228.55183-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 In blk_get_device_by_str(), the comment says: "Updates the partition table for the specified hw partition." Since hw partition is supported only on MMC, it makes no sense to do so for other devices. Signed-off-by: AKASHI Takahiro --- disk/part.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.33.0 Reviewed-by: Simon Glass diff --git a/disk/part.c b/disk/part.c index a6a8f7052bd3..b330103a5bc0 100644 --- a/disk/part.c +++ b/disk/part.c @@ -427,7 +427,8 @@ int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str, * Always should be done, otherwise hw partition 0 will return stale * data after displaying a non-zero hw partition. */ - part_init(*dev_desc); + if ((*dev_desc)->if_type == IF_TYPE_MMC) + part_init(*dev_desc); #endif cleanup: