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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id ED618C433F5 for ; Fri, 10 Dec 2021 06:50:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9438B82F03; Fri, 10 Dec 2021 07:50:30 +0100 (CET) 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="hYcIJ4zm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D17D82F96; Fri, 10 Dec 2021 07:50:28 +0100 (CET) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 6C44C82982 for ; Fri, 10 Dec 2021 07:50:23 +0100 (CET) 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-pf1-x429.google.com with SMTP id x5so7720282pfr.0 for ; Thu, 09 Dec 2021 22:50:23 -0800 (PST) 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=CE9Ru0+BtM/aB7yGhZ7xbEBAasBATDEKK3UGeDqn+m0=; b=hYcIJ4zmeCNYWZAz9zTH0Dz4S4lcYZGsgIfBf2DUjtF3Jp4F7EbksnGipk8fKNhk6r dPt4+OHQIajINW4cM3azGcJ7uKYnaI2AiLNGP8FtyTuGvKqiptIJbhN1kdB4tb8wSHWv sdfX5JkWuP1NOgAKkmV7a9pwDvms0JoVPiZDfQeVe37e09XLJpP1oLjDDEmvpejn/zc9 PSNtb4tqQqzhBr8HSv+M+x+A7j4S4rFDa2Wq9kThInpwOMmWwlQFJgpHZaH0F8hJT8Q7 y3vLpKBhqPGxb/ORXxPcmsNnaZKz3x5CPN5PiPPIhius19qtptvflxfqVpbV82uk7fV4 1cfg== 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=CE9Ru0+BtM/aB7yGhZ7xbEBAasBATDEKK3UGeDqn+m0=; b=z1TAxQkHoh+Xlf1p2liqIugklCEYXWXfU/U1KJ474TVGYLj13cAAYW+2DP0GsPn/Eb CRXbui/sxQi9l15KijYgTAiAtjPDZ2R81OExIIHlcNk6wr9JgI5V7eNgWMamScpK2Wvh j3hZPGVUXkiIeOmchA9UGSXT9emYmTILSmGp2mHRlJimn2FrFzXacAAyaTWXPERmuDdy HSQqHNMKX7diHre0+qnP64YqWg+Grru5dNucSJw5KmII3lQN/W1cVEYrHCdumbpf0pfB lc2ifuszHUviImVW9K7WKM/U/uKc7+SZ+YgLYK53ds8EWeD2rjhd8DpOxK91XeDtnvoy 2sEA== X-Gm-Message-State: AOAM533nVULbZfkymxUS1kPiqhpjW8rTYC6hozjmpS+svZ0hQBfxCnCM UBP0hTNv+MuAMMqYQBt/gc0jDA== X-Google-Smtp-Source: ABdhPJyeEeyZIsZ4WhkFRgw0emqFkV7ttZSVMNG9dk9Ep+V85jB+O7jLU8pqmode3U9tVzJ9KWDLnw== X-Received: by 2002:a05:6a00:b49:b0:49f:c8e0:51ff with SMTP id p9-20020a056a000b4900b0049fc8e051ffmr15936789pfo.36.1639119021703; Thu, 09 Dec 2021 22:50:21 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:75dd:4e0e:4542:936e]) by smtp.gmail.com with ESMTPSA id nn4sm1639035pjb.38.2021.12.09.22.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:50:21 -0800 (PST) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC v2 01/20] part: call part_init() in blk_get_device_by_str() only for MMC Date: Fri, 10 Dec 2021 15:49:28 +0900 Message-Id: <20211210064947.73361-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211210064947.73361-1-takahiro.akashi@linaro.org> References: <20211210064947.73361-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 Reviewed-by: Simon Glass --- disk/part.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disk/part.c b/disk/part.c index fe1ebd4adf7e..c0556a41e57f 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