From patchwork Fri Jul 26 08:23:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuno Sa via B4 Relay X-Patchwork-Id: 13742476 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4304B1779AE; Fri, 26 Jul 2024 08:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721982181; cv=none; b=lpbvrNhT9JF3y5dMbgrv+afM9KppWqe6C6C399QoXl8dnDp+2Ssb0fJ9ehkFNUlR95wqT0q60yHaVkw24cIXDOPqc1ssepmtEths3uJ5yDhVyyys0gljiWvqAVrqj7HHEGXckFmqgAhcKzmTI+UyReq09oiP6nAthZUexyglftA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721982181; c=relaxed/simple; bh=9o8I3NqkG1lAqPIz5hVefBr/CncZcX9NP+bU2VC3KTI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UfoMrznBBnaYGV/KYzWWfY0H58BpCftm8dlJaabpYulWGQOV8JQc9y+7Gv8GuJfstdwRN4ttIkbsb248JISSSfdKd8QQSsfjKhRyw5p92XNX2B3suUJafbr+kUWjz9V41A/Rw18dcBGXFSWTfdUMQ07TERD7aJQsN4Agp0VFr74= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OkiKSLNi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OkiKSLNi" Received: by smtp.kernel.org (Postfix) with ESMTPS id 25C02C4AF49; Fri, 26 Jul 2024 08:23:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721982181; bh=9o8I3NqkG1lAqPIz5hVefBr/CncZcX9NP+bU2VC3KTI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=OkiKSLNi9uWz2Z4/vR62H53qeDsy54R7T/Ebn+S5wZmqPTsHSFYbwOpT+wJCSkAA9 vpIduRc+bHzLlf37/Rs1sQw6aQ2OSCFWg+1BRX6UuHlwdwkhBhzqrAQ9e7qns7Vf8F Iev8qFHn+Lz7T/q2KpzRv5bNe/3Lt9hc0mB8aarp95BgQ9iPu6hD5toZ99ZEJPyacS pb61i0ufFNBvaygLFrFKz+W7lkJwAe5BPyOp78JPzaj7RoB4bkeolFUKSfqG0JoiJT uYVt3UtI1kNu8Rk1rdGpBvPW0psHIXkRHhgZ87uPBeAmHPreEA8vycyQQ38wSDiORR 7rE35+6z0F2Dw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B7B8C49EA1; Fri, 26 Jul 2024 08:23:01 +0000 (UTC) From: Nuno Sa via B4 Relay Date: Fri, 26 Jul 2024 10:23:07 +0200 Subject: [PATCH 15/23] iio: adc: ti-adc12138: make use of iio_for_each_active_channel() Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240726-dev-iio-masklength-private3-v1-15-82913fc0fb87@analog.com> References: <20240726-dev-iio-masklength-private3-v1-0-82913fc0fb87@analog.com> In-Reply-To: <20240726-dev-iio-masklength-private3-v1-0-82913fc0fb87@analog.com> To: linux-iio@vger.kernel.org, linux-staging@lists.linux.dev Cc: Lars-Peter Clausen , Michael Hennerich , Ramona Gradinariu , Antoniu Miclaus , Jonathan Cameron , Marcus Folkesson , Kent Gustavsson , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner , Maxime Coquelin , Alexandre Torgue , Francesco Dolcini , =?utf-8?q?Jo=C3=A3o_Paulo_Gon?= =?utf-8?q?=C3=A7alves?= , Haibo Chen , Michal Simek , Benson Leung , Guenter Roeck , Greg Kroah-Hartman X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1721982178; l=872; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=JlJjGB3lg1jNVkw6cQ+EWvwyLYo97WC3H7QNVgN9TVE=; b=LPYb7OUDdSdoHOHRuIJxFdPlR0k8K4xrVDG3tT0L3FiVkgEzqPzPYtOHRVy7rl4e2wHrl3JQt zM8FNNhlONgAZXZTSkVCKampaTXtqhs+TxY2QZMpTYgclVVLby78Whn X-Developer-Key: i=nuno.sa@analog.com; a=ed25519; pk=3NQwYA013OUYZsmDFBf8rmyyr5iQlxV/9H4/Df83o1E= X-Endpoint-Received: by B4 Relay for nuno.sa@analog.com/20231116 with auth_id=100 X-Original-From: Nuno Sa Reply-To: nuno.sa@analog.com From: Nuno Sa Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa --- drivers/iio/adc/ti-adc12138.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti-adc12138.c b/drivers/iio/adc/ti-adc12138.c index c0a72d72f3a9..a2cd8c454e11 100644 --- a/drivers/iio/adc/ti-adc12138.c +++ b/drivers/iio/adc/ti-adc12138.c @@ -344,8 +344,7 @@ static irqreturn_t adc12138_trigger_handler(int irq, void *p) mutex_lock(&adc->lock); - for_each_set_bit(scan_index, indio_dev->active_scan_mask, - indio_dev->masklength) { + iio_for_each_active_channel(indio_dev, scan_index) { const struct iio_chan_spec *scan_chan = &indio_dev->channels[scan_index];