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 D384EC761A6 for ; Fri, 31 Mar 2023 14:19:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2B413860A6; Fri, 31 Mar 2023 16:18:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="pPdBb/Cj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 660848575B; Fri, 31 Mar 2023 16:16:44 +0200 (CEST) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (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 E4951858FF for ; Fri, 31 Mar 2023 16:16:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-544f7c176easo417168417b3.9 for ; Fri, 31 Mar 2023 07:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1680272198; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rpusQo8kJe+pPBWzKSUnP/F8sLI7j/40WgSYOWUBVxs=; b=pPdBb/CjqEl1Yfnfzwj2NOzj1eEhz1Jmv9lAGU/gNVpREZaP+YJ4DcFnKZE/yyHXWz SFgd1z6bmUOXHaiUF0w6VY7QLcfd/4bJrMmDtIp67YBiBSrAWaq+7YAFMCVbLPUe5Zbt 8dtLVAxHrr32Uj3vkFmkqWJmSd42lV1YMVNNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680272198; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rpusQo8kJe+pPBWzKSUnP/F8sLI7j/40WgSYOWUBVxs=; b=O181M47wqZSS7A1vNw0RYDVUBfIkg9G7P3zauCg1HhHXJzdBkI4lr4Pek1Ny9vczMt WJ1YM0AzUlTeSUaBG9vFhR4Oyn300l8xjzGPyTIoHOSGNOu5thIQsOA9P5MDMND+PA7d clxVvVIa43gnaPymqyHzNK9p9tOu2VsL0ZL4+wkAGMjRtH7a4oXX5PSmYVPEIDfzGng/ Ara7x9TO8UrwwLbuwPJkf1Wcpqt1rRkCg3Ij14AOFa0cuWJH8m0qqGpBmo2/+TyRW/PX WUkgIc7viXLfZ8lip0JTmSWApDEukvxF7693gR9uGs2cDISCPHL5evhc0VAMmAO3ltF/ gCKQ== X-Gm-Message-State: AAQBX9ceZrcb4dI7QpQNCMOwRFqE8jzMX/j/SL/mABO57XOTHkC0xCg/ 3oVLfzKakKl5kcwZ51LhT3/V/h+uCC9QuLPJg4f7mA== X-Google-Smtp-Source: AKy350ZMPtwi9T3m+JrK9Wo5OycmZsIQzrOiOzlvxa3d81BCMpQHb+wqUdBP0MNlI45KpiPVYGOQew== X-Received: by 2002:a81:6546:0:b0:541:69aa:4c6f with SMTP id z67-20020a816546000000b0054169aa4c6fmr27831420ywb.44.1680272198679; Fri, 31 Mar 2023 07:16:38 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-1500-2834-9def-41f1.res6.spectrum.com. [2603:6081:7b00:6400:1500:2834:9def:41f1]) by smtp.gmail.com with ESMTPSA id d195-20020a811dcc000000b00545a08184d8sm540433ywd.104.2023.03.31.07.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 07:16:38 -0700 (PDT) Date: Fri, 31 Mar 2023 10:16:36 -0400 From: Tom Rini To: Rasmus Villemoes Cc: u-boot@lists.denx.de, Sean Anderson , Simon Glass Subject: Re: [PATCH] sysinfo: gpio: fix loop over DT "revisions" array Message-ID: <20230331141636.GP13222@bill-the-cat> References: <20230310105803.1824795-1-rasmus.villemoes@prevas.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3mxcI5cApn92KXfw" Content-Disposition: inline In-Reply-To: <20230310105803.1824795-1-rasmus.villemoes@prevas.dk> X-Clacks-Overhead: GNU Terry Pratchett 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.8 at phobos.denx.de X-Virus-Status: Clean --3mxcI5cApn92KXfw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 10, 2023 at 11:58:03AM +0100, Rasmus Villemoes wrote: > There can certainly be a lot more elements in the "revisions" (and > "names") arrays than there are gpios used to form the trinary number > we're searching for; we simply don't know the array size up-front. >=20 > Nor do we need to, because the loop body already knows to recognize > -EOVERFLOW as "not that many elements present" (and we have a test > that specifically ensures that dev_read_u32_index() returns exactly > that). So just drop the i < priv->gpio_num condition. >=20 > While in here, fix the weird placement of the default: keyword. >=20 > Signed-off-by: Rasmus Villemoes > Reviewed-by: Simon Glass > Reviewed-by: Sean Anderson Applied to u-boot/next, thanks! --=20 Tom --3mxcI5cApn92KXfw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmQm60QACgkQFHw5/5Y0 tyzk5wv8CcXcmSHupJ4LydBeRd7R6mJcP47ZT39/sGRnIWm/IgcXWzeMedSjJr1/ 8Js9d/rvrw5JkgAaNfEHscUEPrHzXjyhEglX8uCjauQ0wEGmfcwEwQLFIhSVwa2p TYbgMzKLqas99n4XxoOGOruScQ19kktbbtD31Y4ICTV8NKXdzUcHUL22AcIiYOoQ ugSX3nCu+t9946LSMDA6Qj23BFksKnHWkAF22FOCsmpGzIY64sDi7cifDqMUonDl 9bJCitwuX+2VHDqmgK7coEj37Di5pNoLkNE0u4RCBCRB6dXpGEOsW/EMIyKroi1N vnJPCOSgDTfod5GDIZ/ABipHMwB2DC0q+eN4kFD/435D0UD4SDaqLjULQB841cIZ pvxRGcaTJxIU0KuJciMjyHMbwbkhISsXHlET9ArIQINKpgDCCGnByYW9VD6FiaUM hQztCbj6KQRybE3oiJ+AhOagT/s6Zk5Tl0LlJHiPVyIl0dRLF4CU0Fo/OZDldSxr Zl3QHEGL =Y7w4 -----END PGP SIGNATURE----- --3mxcI5cApn92KXfw--