From patchwork Mon Jul 20 11:02:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nastya Vicodin X-Patchwork-Id: 1332208 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=Nus7yzUY; 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 4B9Jn433Whz9s1x for ; Mon, 20 Jul 2020 21:06:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A099982181; Mon, 20 Jul 2020 13:03:50 +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="Nus7yzUY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5654E81BDD; Mon, 20 Jul 2020 13:03:19 +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-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (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 5CBC581C0D for ; Mon, 20 Jul 2020 13:02: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=vicooodin@gmail.com Received: by mail-lj1-x244.google.com with SMTP id q7so19794187ljm.1 for ; Mon, 20 Jul 2020 04:02:53 -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=Nus7yzUYy6CrpfMG5kag9SvdVaVbaMy2BJRijAb60ve5DkhaXPV3HUAUdcGoo5DrrS 7WuHgakSIdwbknh6MxRFQNqzEOeCc90drHKYToY0O6uAXtnBjxwr5tSPWh5sTD3mrS65 NS2lPQoAd2t+Gm3GjI+QtZJ6jVVAz+mxDZvLlMQMSz9/IyD4QVuNj3H2+nZvmT/c4uW5 CYldZpDMiWhtE3o7hnU+6NpA/LqyM74RucJdOcAHQ2kclAjk9NryIwuPsOi91rrKtVQ8 pNLU/yVp5Rc3PIn4CR7oCr7AOKBdKM0a95vJ9KyotRIHkln19Fm+IPI4bBskTwpa7oUQ YWOw== 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=iUgJ3jkBM/MrbjFTr17nVCMLveuzvwslYXDvoThGuqxY6Fw9hfwdeYDIW8XfO6BEQD aaJXBaD0C0p9WXEkm+j3PkE5m7EzKGQkIt3QeHpgucpM2jdS3Zd5cQr4rRxcuU/IBUu/ +ZErFuAKQmtk5AbyEHAoNd31uGpicy9nKeB3cHu0rHAA3BZC/c3QblJGWFMNMU24zHfZ 0QI7VGAxNoaNKZSeaz9plEiI266PHdwkDvRlICWMYgukeoJaM7fzV8Bh9YpF63xW1N8R ntXlVcPT3GvgD5v3emxBY5YPvpSvzdl4IGWayhry+tZrfBtUO7fAvd6rq44pfYtWnrrS /F8A== X-Gm-Message-State: AOAM533OY0LqOfJwTP22hIGgXuHL9gDx0QW57DBtgbesGJ6yV9BgqacO eh6CBtzC5hM5OF9wP3QsqyD8H8zL/SIW7g== X-Google-Smtp-Source: ABdhPJzo6+1ZyMLZoTTY87MFa5IWgFWonZrgO05a6XjT9+dKfwCYHGRPlEUOLSey7HODueNQi/pplg== X-Received: by 2002:a2e:7314:: with SMTP id o20mr10395009ljc.233.1595242972405; Mon, 20 Jul 2020 04:02:52 -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 l1sm3169130ljc.65.2020.07.20.04.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 04:02:51 -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, vicooodin@gmail.com, Anastasiia Lukianenko , Oleksandr Andrushchenko Subject: [PATCH v2 16/18] xen: pvblock: Print found devices indices Date: Mon, 20 Jul 2020 14:02:22 +0300 Message-Id: <20200720110224.28851-17-vicooodin@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720110224.28851-1-vicooodin@gmail.com> References: <20200720110224.28851-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)