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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CCABC433EF for ; Fri, 1 Oct 2021 11:48:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 96EAC61A83 for ; Fri, 1 Oct 2021 11:48:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 96EAC61A83 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B975380C83; Fri, 1 Oct 2021 13:48:41 +0200 (CEST) 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="R7xNxELP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9538B81545; Fri, 1 Oct 2021 13:48:39 +0200 (CEST) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 978A9802A1 for ; Fri, 1 Oct 2021 13:48:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pbrobinson@gmail.com Received: by mail-ed1-x530.google.com with SMTP id r18so33643438edv.12 for ; Fri, 01 Oct 2021 04:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0mRzwgmxHQWsDvOF5yU9svs9HWAeufKS7TpB7EkE/NY=; b=R7xNxELPWnIrNdzUucWPlI4qy7uIdH/KLlYqlFbr3mmWgNT4kjOb+gKGmpPf3nJpXl zVQOWqgSwfpy/1OrwuGgQ08fqtJFRdtndef6TycsBs0wk+7hoFRZDK785x1kkRW5KtwL M1I6tmFxkpsN9bi6DtypgTwQYauk4yooJXclWkPak5JtN3kllRmNSoTk3gTyXEu1awPT r14fSDhD3XI3Y5jpESBnuTE/suNW92ts86TY6avjULd5dNBbuRF1c6J2AQVDSIXRsCPP Nwu0pqyWoy7bMxDjy5V7vf636fn1tKwqYnoZq3FPtz3U/J8pvCDAKgTYzTX0Uq4JLfwC xiow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0mRzwgmxHQWsDvOF5yU9svs9HWAeufKS7TpB7EkE/NY=; b=vOdUyJu27YDBUGMU7PDvMwplJl4oym/nfcU2qM0t2Ma2fs7hsE1I10dPQVYGg6rfpB 3gwxkC6Y7j3gXjKILs64AYlI5h6homaSmvTaUC5oxHKUogSGBqcKS15XyGNUQB8YZmdi KANjPCtV6NdpCNf7FJt+utnGaR4zjZ+f3oLFYghpIRERi4BZN/bXJYWfbuS71VK09JjU RWxZDw25Lp2a2AWWqfAzQRPplZ95n2tlDfKSyWUOQXxQvEyxyEn1+qZs2P08RZZQky5d UamuGjZzlBTJk+jDu740OlsdKMv2OoKw9lGAHZlKiSgPu9JL2TTCyKFd6vwvvuIVOP34 KSyA== X-Gm-Message-State: AOAM533HOgS4KH8X51QhMDSkfi3Aw7SlnQPHWQui7XYghZuh8dpJvq8d 7miagfyMhhkn6p++lA2W9JhrKCIa5oPKDfIO17Q= X-Google-Smtp-Source: ABdhPJzPg6885YoM0QC3+7vt7AvCoiCPiJSdaZLyicybyrZ8ZlO0WIfUp9FFAHnTxKWdj/4EgFuG8wt933mEmLS+eX8= X-Received: by 2002:a17:906:2b90:: with SMTP id m16mr1978916ejg.344.1633088915756; Fri, 01 Oct 2021 04:48:35 -0700 (PDT) MIME-Version: 1.0 References: <20211001050228.55183-1-takahiro.akashi@linaro.org> <20211001050228.55183-2-takahiro.akashi@linaro.org> In-Reply-To: <20211001050228.55183-2-takahiro.akashi@linaro.org> From: Peter Robinson Date: Fri, 1 Oct 2021 12:48:24 +0100 Message-ID: Subject: Re: [RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC To: AKASHI Takahiro Cc: xypron.glpk@gmx.de, agraf@csgraf.de, Simon Glass , ilias.apalodimas@linaro.org, u-boot@lists.denx.de Content-Type: text/plain; charset="UTF-8" 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 On Fri, Oct 1, 2021 at 6:03 AM AKASHI Takahiro wrote: > > 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. Is it not also supported on UFS, and I believe it may also be an option in the NVME spec too. > Signed-off-by: AKASHI Takahiro > --- > disk/part.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > 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: > -- > 2.33.0 >