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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 496E7C83F33 for ; Mon, 4 Sep 2023 20:37:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xq7ObWIzTtyoGIYTjH8xgQREPRB5ZhwXaCkXf9BfvBk=; b=QMzOmxUFSfyZ+cshIHbR7Ku6ID D224W90j7+w+6XpZ4QTQi1OwxJNAuy5yzNkO1ACuyivmelh8o/e/1mqQHqCGcTsIi98lGkWw2zooa GpH9ZtgCwrrIYxtT0xdKq3LPYPMg2G4X3dhk2OPomwzpQ2YYg3WeZxnfmgGOAwabCZlHfDMHurFrv bjrGuV1pOEP53SjWly+nrtc4b2SIGdtE0swjUeJR0EISEL5rD3eIl5Uv9sZ+16qZigna7K85gUHZF UKYBneuHO6gb1amtcKhi8VDRjeVJcD0SFHfuk6yBc9og7mfDXnpdtQIZ+C+3qjCocu5ivM7LjUK39 Dlxe+wbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdGJR-004lhg-0d; Mon, 04 Sep 2023 20:36:45 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdGJN-004lhH-2y for linux-arm-kernel@lists.infradead.org; Mon, 04 Sep 2023 20:36:43 +0000 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)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 499F5B80CAA; Mon, 4 Sep 2023 20:36:40 +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 In-Reply-To: <20230829134029.2402868-2-fabrice.gasnier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230904_133642_121443_B877AB4B X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8462807659697391249==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8462807659697391249== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+/TWu6qhPiWTQHjU" Content-Disposition: inline --+/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-- --===============8462807659697391249== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8462807659697391249==--