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 11B50C04A95 for ; Sat, 22 Oct 2022 14:33:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B6BD84BF3; Sat, 22 Oct 2022 16:33:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="ijff0lPy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zXcIg0BK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C389384F39; Sat, 22 Oct 2022 16:33:13 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 978AF84EA1 for ; Sat, 22 Oct 2022 16:33:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=msuchanek@suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 5DC081F892; Sat, 22 Oct 2022 14:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666449191; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZGykXlVtb5Cua87YN+9kYE1WRySmKv+ZoSq1xbFW2+o=; b=ijff0lPyoegVIY3QGqlIXaUDWnTyC7Us02mq/H8ZL2pmfEAwNTTeYgAVezt/pv1xvSieZB 7Ansm2svu9wsBN+oijmV9hmLLxQLpfBt7/qW2qrtWX6Yybkdh+K4mcne/BzK45WfL8A7Ut DgtLKkgCINnxcppXfjIkd/9K7Ys2M8o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666449191; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZGykXlVtb5Cua87YN+9kYE1WRySmKv+ZoSq1xbFW2+o=; b=zXcIg0BKaHkykTVtSg9ESptnhlYCWoUOdm7LeA99XJHt42QDoSpq+iHVkLBT0XzsxGONO4 2ormM1OE4U3zs5BA== Received: from naga.suse.cz (unknown [10.100.224.114]) by relay2.suse.de (Postfix) with ESMTP id 326912C141; Sat, 22 Oct 2022 14:33:11 +0000 (UTC) From: Michal Suchanek To: u-boot@lists.denx.de Cc: Michal Suchanek , Anastasiia Lukianenko , Oleksandr Andrushchenko Subject: [PATCH] xen: pvblock: Use uclass_probe_all Date: Sat, 22 Oct 2022 16:33:05 +0200 Message-Id: <20221022143306.18242-1-msuchanek@suse.de> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Also eliminate useless code and variables. Signed-off-by: Michal Suchanek --- drivers/xen/pvblock.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index 95e298d7dd..4ad548d599 100644 --- a/drivers/xen/pvblock.c +++ b/drivers/xen/pvblock.c @@ -818,8 +818,6 @@ static void print_pvblock_devices(void) void pvblock_init(void) { struct driver_info info; - struct udevice *udev; - struct uclass *uc; int ret; /* @@ -828,15 +826,12 @@ void pvblock_init(void) * virtual block devices. */ info.name = DRV_NAME; - ret = device_bind_by_name(gd->dm_root, false, &info, &udev); + ret = device_bind_by_name(gd->dm_root, false, &info, NULL); if (ret < 0) printf("Failed to bind " DRV_NAME ", ret: %d\n", ret); /* Bootstrap virtual block devices class driver */ - ret = uclass_get(UCLASS_PVBLOCK, &uc); - if (ret) - return; - uclass_foreach_dev_probe(UCLASS_PVBLOCK, udev); + uclass_probe_all(UCLASS_PVBLOCK); print_pvblock_devices(); } -- 2.38.0