From patchwork Thu Aug 6 09:42:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nastya Vicodin X-Patchwork-Id: 1341557 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ewsI9wKE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BMkCN0fhSz9sTM for ; Thu, 6 Aug 2020 19:46:24 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9E6578223D; Thu, 6 Aug 2020 11:43:53 +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="ewsI9wKE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C02E7821F1; Thu, 6 Aug 2020 11:43:38 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (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 6320582218 for ; Thu, 6 Aug 2020 11:43:30 +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=vicooodin@gmail.com Received: by mail-lj1-x241.google.com with SMTP id v12so20685232ljc.10 for ; Thu, 06 Aug 2020 02:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cQrnEiCETHgpT6wAYXFAbBSwNGRHDenUa/RVeCKXdXQ=; b=ewsI9wKEcFOzQGmAp5urWHtn5MK3BfvQpQ/m6Hn+uFG5leDhKCHj2FFM/h3EFN4cCy O2iQANvS0bE+k2F5xWZggRC22riB278Uh2ezhHT5eCTc+o2jnexwjj/6BffOWGFzigTB R9LbYj9wzrGp3On8Ja+I3Bw9X9u2vFmmq/VgCdPyT5RCXEzfpRJlyQDWdnSRsAQydatD gcKEeuMoCbeqn/eCpSaOZM0Xh/t6Y7/s9jzi4HXLkcUdDHKdzF54itGRGFQzUxm7qkZZ ZMGTAU0Jtc+FZ0bw01oXKqQP++enNyjhQedl7iYhT7sJUUjePvKtb64858DIhdW5yvgj 8s5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cQrnEiCETHgpT6wAYXFAbBSwNGRHDenUa/RVeCKXdXQ=; b=AStRikZqyS6reBFNfE5wYrTiTI9L9453gHj3ohXLdnUkNvzJEq9OKqE5U+9E6LTTGs CFVszSldSMNJ7zoUyA6qLoV575dTLDJKRoTcRw0p+7HHH6lHaMg3XGKI3f5+PmT57P07 dGJhg1TjQCvto/BQ3K70GQFgnQDWKIxBJk7tPJ6NoT9uX8Ezw7PUqVgz/01EbPM49sI5 tIj+nQXueOwQVRH4mia443lcl2R8+LH5lR2DmgPxv7Up/6RtORa0AqNqD9tud8dkOYmX GAG0NOr+KTDVXnycpRftoDodL4X339ywANAJJ94TUMFp1oKAQk84PzOoThZ+F9WSaESC zJ7w== X-Gm-Message-State: AOAM533s+T1+Tr2FjkjoSvDs9GRWrfxudMrflU2CxZUZvK5K1OwrJtAs oacC65S1Qi/GTpMTq8y3oZoJjFnvA/fz+A== X-Google-Smtp-Source: ABdhPJzzHqJlhJg8fQ2nKwm9C6ipyD9lwMhW4jNt/QUroraIcOBo7Cdznoo33t4EVVD6B+noEI7urA== X-Received: by 2002:a05:651c:284:: with SMTP id b4mr3535517ljo.278.1596707009453; Thu, 06 Aug 2020 02:43:29 -0700 (PDT) Received: from localhost.localdomain (host-176-36-213-80.la.net.ua. [176.36.213.80]) by smtp.gmail.com with ESMTPSA id j13sm2151866ljh.83.2020.08.06.02.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 02:43:28 -0700 (PDT) From: Anastasiia Lukianenko To: u-boot@lists.denx.de, sjg@chromium.org, ye.li@nxp.com, bmeng.cn@gmail.com, xypron.glpk@gmx.de Cc: julien@xen.org, sstabellini@kernel.org, peng.fan@nxp.com, roman@zededa.com, volodymyr_babchuk@epam.com, andr2000@gmail.com, vicooodin@gmail.com, Anastasiia Lukianenko , Oleksandr Andrushchenko Subject: [RESEND PATCH v2 16/18] xen: pvblock: Print found devices indices Date: Thu, 6 Aug 2020 12:42:59 +0300 Message-Id: <20200806094301.4999-17-vicooodin@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200806094301.4999-1-vicooodin@gmail.com> References: <20200806094301.4999-1-vicooodin@gmail.com> 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.102.3 at phobos.denx.de X-Virus-Status: Clean From: Anastasiia Lukianenko Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Anastasiia Lukianenko Reviewed-by: Simon Glass --- drivers/xen/pvblock.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index 1284bc4cca..76e82fbf41 100644 --- a/drivers/xen/pvblock.c +++ b/drivers/xen/pvblock.c @@ -793,6 +793,24 @@ fail: return ret; } +static void print_pvblock_devices(void) +{ + struct udevice *udev; + bool first = true; + const char *class_name; + + class_name = uclass_get_name(UCLASS_PVBLOCK); + for (blk_first_device(IF_TYPE_PVBLOCK, &udev); udev; + blk_next_device(&udev), first = false) { + struct blk_desc *desc = dev_get_uclass_platdata(udev); + + if (!first) + puts(", "); + printf("%s: %d", class_name, desc->devnum); + } + printf("\n"); +} + void pvblock_init(void) { struct driver_info info; @@ -815,6 +833,8 @@ void pvblock_init(void) if (ret) return; uclass_foreach_dev_probe(UCLASS_PVBLOCK, udev); + + print_pvblock_devices(); } static int pvblock_probe(struct udevice *udev)