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 7D0F8C433EF for ; Wed, 24 Nov 2021 22:22:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D9FA8365E; Wed, 24 Nov 2021 23:22:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="i7UfJafP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8580812C3; Wed, 24 Nov 2021 23:22:28 +0100 (CET) Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) (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 0B0EB82F87 for ; Wed, 24 Nov 2021 23:22:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ua1-x935.google.com with SMTP id az37so8205166uab.13 for ; Wed, 24 Nov 2021 14:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:in-reply-to:references:date:message-id :subject:to:cc; bh=cV7DbmMQ8Fr2TYbSc36CJ2PjWCY3H/Yb0/m/z0anEBY=; b=i7UfJafPP1J5Adqoy2yI4mZHk/enWyg5rxYHN2+SX0MuePZnC15imxATzu2870ZfAY jrbx6WP01SWDsy6pwfvQDZvbhiD6+twQ5bl4NE0oATPKHTfECg5fx9GXrFXWoY89r+Ps b7lFYvM6/5CkreWqhqtELijR0Xl6K0C/gdFI0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:sender:from:in-reply-to:references :date:message-id:subject:to:cc; bh=cV7DbmMQ8Fr2TYbSc36CJ2PjWCY3H/Yb0/m/z0anEBY=; b=EE0uXo0rJlKvxXTK3Uln4D6cukMNopQaPJwQp2vuAqTqp2p5KgeUcOp20KB+XRqRy7 EcT9sN2oou5L2LcUj7KGnuEXCqIEyQ6PzsJLAnl3DDxJGpk/f407d2zZQv21lPu+hNWd rpfonaEB4Tf6kxvPTOX/Od+xqWLPX4vWMs7BcWtwx+fa+SU7tb/aZO2bp800EltYKsrB ZY3PkP/DBfHxFsSFqyCF+joGa/HsVi153QhBeIMKRylMgZFAij/JtFu0Jn8t2yHcLlOF O360o8I81UU+kfffTT7tRBfecrd8Zf5rnFaqItUOi83LQPhDOxE3CjWsCxJAO1oge96y V9Ow== X-Gm-Message-State: AOAM532OQTVpoTGmIeYsQ3AKxDkqCaejPgZfCtdTe9HiXMV4N9uoLzq+ O+xpsaaPWA4OBovbYbGQNZvC8MUj7k9Wvz58tQSOGQ== X-Google-Smtp-Source: ABdhPJxhyt8drbZcPxvckbUacGE0ypFyToEJRFVjzopSRIaRpktDiP6J4cQXuMOXa9ReJZjiGHlYQTkvUVa3x9bbpn4= X-Received: by 2002:a05:6102:c4e:: with SMTP id y14mr714618vss.61.1637792543569; Wed, 24 Nov 2021 14:22:23 -0800 (PST) Received: from 480794996271 named unknown by gmailapi.google.com with HTTPREST; Wed, 24 Nov 2021 17:22:22 -0500 MIME-Version: 1.0 From: Simon Glass In-Reply-To: <20211023232635.9195-14-sjg@chromium.org> References: <20211023232635.9195-14-sjg@chromium.org> <20211023232635.9195-1-sjg@chromium.org> Date: Wed, 24 Nov 2021 17:22:22 -0500 X-Google-Sender-Auth: NV7Tw-yy0L78dkn3qhb85HR--PI Message-ID: Subject: Re: [PATCH v2 15/41] dm: core: Add a way to count the devices in a uclass To: Simon Glass Cc: Michal Simek , Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Daniel Schwierzeck , Steffen Jaeckel , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Lukas Auer , Dennis Gilmore , Marek Vasut , Pavel Herrmann , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 Add a function that returns the number of devices in a uclass. This can be helpful in sizing an array that needs to hold a list of them. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/uclass.c | 12 ++++++++++++ include/dm/uclass.h | 8 ++++++++ 2 files changed, 20 insertions(+) Applied to u-boot-dm/next, thanks!