Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1927969rdb; Tue, 5 Sep 2023 09:03:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqZOi0QoN476fel0gX2sP2zPj3yB/kg7q9gae4qzmNP24Z7GIgPuy+cUqcp02/5jZn4IhL X-Received: by 2002:a17:906:1099:b0:9a2:2841:7908 with SMTP id u25-20020a170906109900b009a228417908mr196811eju.24.1693929835307; Tue, 05 Sep 2023 09:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693929835; cv=none; d=google.com; s=arc-20160816; b=QQ1EEevttRH5+0juG/sBmMOlibkSCHl6vWT6DmG3c84hGhzFUP/fcNY81jazcw/Ojz N5I75ZCDjE5MJO6te2rQLOe2c13e1Iv9vYSsuON40AzU9H151gw0ONoP7LarLgCfx+LO Bn+NaJzZa52fSFCqK3SPNJnWLt9r3JEzdmIPsm9OQqIAxZ/Si7rKWNuqcfLpUHr0ZOzG vJsyou8GvDRIHCflt3wK4JS8knHEHkPZOKmgI1q8DYzkk+zrwbNQRymv0ivvVCVsE40e jPPrpSk2RFQ1RYJwTktGEDHyeMu6FVV1Y2nVacyvy0KR1WwVWj1VSFJvXDGBRrKL6l2X EytA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=eB9VkwqW0mytaNiMmtmEZYStmjoWNuVFnF42oI7JPPk=; fh=wT9Q6l4w0nN9BZc2VSxa7kC4ae7opG8tVDMNxCIfbBM=; b=aj88tEP8EQ5bn/wBQJnRAdpL567+I/9TfJtbzdccEVe6BY42cB4T1IYSxvUWe31u2c SmJTTCJd9DqRPCSqbT3h7M7hLckYyEfueZqpdBFJTfnGN9lP9e95x32V5s7XcupiDwbw lPd1/g0w+g7GKPI59WiF2Tc2NGdZdNRpFSJabMa9qpM8ChDzwNVzDaWmB6mCqK2x8FLB M+jxuAqVEkP5j2DJ7yEo76uhK+aY2P90OfP7LW3wt1JrnWO15ISbDYb9TLs6gNqDBixR xQudUrzmwf9p6Gm6eTSL+oHz+xUP98Frr6pqxL6UBpHkndqKk02AEgCN8FJNBZPuNPFc 2dNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a170906961500b0099ca94b4d01si7980421ejx.705.2023.09.05.09.03.47; Tue, 05 Sep 2023 09:03:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238324AbjIDUgn (ORCPT + 24 others); Mon, 4 Sep 2023 16:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbjIDUgn (ORCPT ); Mon, 4 Sep 2023 16:36:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CCE9187; Mon, 4 Sep 2023 13:36:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 962C460A0A; Mon, 4 Sep 2023 20:36:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1545CC433C7; Mon, 4 Sep 2023 20:36:37 +0000 (UTC) Date: Mon, 4 Sep 2023 16:36:35 -0400 From: William Breathitt Gray To: Fabrice Gasnier Cc: lee@kernel.org, alexandre.torgue@foss.st.com, linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] counter: chrdev: fix getting array extensions Message-ID: References: <20230829134029.2402868-1-fabrice.gasnier@foss.st.com> <20230829134029.2402868-2-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+/TWu6qhPiWTQHjU" Content-Disposition: inline In-Reply-To: <20230829134029.2402868-2-fabrice.gasnier@foss.st.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --+/TWu6qhPiWTQHjU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 29, 2023 at 03:40:22PM +0200, Fabrice Gasnier wrote: > When trying to watch a component array extension, and the array isn't the > first extended element, it fails as the type comparison is always done on > the 1st element. Fix it by indexing the 'ext' array. >=20 > Example on a dummy struct counter_comp: > static struct counter_comp dummy[] =3D { > COUNTER_COMP_DIRECTION(..), > ..., > COUNTER_COMP_ARRAY_CAPTURE(...), > }; > static struct counter_count dummy_cnt =3D { > ... > .ext =3D dummy, > .num_ext =3D ARRAY_SIZE(dummy), > } >=20 > Currently, counter_get_ext() returns -EINVAL when trying to add a watch > event on one of the capture array element in such example. >=20 > Fixes: d2011be1e22f ("counter: Introduce the COUNTER_COMP_ARRAY component= type") > Signed-off-by: Fabrice Gasnier Applied to counter-fixes as commit 3170256d7bc1. Thanks, William Breathitt Gray --+/TWu6qhPiWTQHjU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZPY/0wAKCRC1SFbKvhIj K9hLAQDqPhZP1YNYM6y5RMNfkbjoeJho9SeB13EQIOIjwx/59gEAlFxHbZqubcku dRYQXe4YDx4kLA6cbnrZfx8lg4Phugk= =RCOJ -----END PGP SIGNATURE----- --+/TWu6qhPiWTQHjU--