From patchwork Tue Jul 2 16:02:51 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: 13720026 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 B0C0AC30658 for ; Tue, 2 Jul 2024 16:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:Reply-To: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dlUEcALQgHmFH8SXR9B2vilP/F+KZw8Wk00vggJyxIQ=; b=P3XxoEPtwz2Piwt9xrOrSECbca pgqa8+be+2WXVQIGQZUrWGQsej6pCMpT+3/f9aFuLP7qajwHiy1R1RDjI7iKPnLSrQ+EeK3ib0oaL ltaQtowspWQOtVrSJkN7qAcrFgQeMiN1HNqnOn2sVvcC87EbI3pobCastMxwuY/EQ36jSCkLVC40e duTel4GSRGzUqIwk1WlYVI3fbip7nZR1Z9LvRBJsk12VKw6yr8EHLocCW7en2v90ca/3UNJfrKRS2 1c5Du4G2r/stVopdO85TgLDMMVDNW7j0D4P8ZPC6YRUKZPqpZfGQmY8v6VJp/nbX9UKVfV7JsiutH dITYwJDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOg0l-00000007Jeg-3hJA; Tue, 02 Jul 2024 16:05:43 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOfxr-00000007IS0-3Sxx for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 16:02:47 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 9EB0161EB8; Tue, 2 Jul 2024 16:02:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 3685EC4AF13; Tue, 2 Jul 2024 16:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719936160; bh=mpdIPf2JJyuaQzZPivxG0g8giXcm2FQ29mHR6NwT0Pw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=EpZRbxI0GenslmjeOX8hSVnqDQS+RiaydEx3/92bIxJncMdwv9pPlh2zHzPoyjc+O u3w6m8Pjw1VyHHk7jZmUFeSx/MJ1iDLGRUF8OnsuzcKY0QPQku1Qj+rKlFvBfaU6l+ dvawAhYyzONpHDnY2jkfp9fN7pSA8KxsmKT/4PGyc2b9ZdNGGAczjRpM8GtNYUYlSR VWtX3Cghj9stii2XErXQBG9czeuazUj7sxqIC7PoG3SbACO3npOqGYJdkN/NHaOD5z 4Vsiv6buPwBEtO46wQZJVhUyaLFS1i9EN7k2jHidPlYwlnQftpdjbxgkQ+sUCp9bmr awc9Gt6lmHiAw== 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 2E58CC3065C; Tue, 2 Jul 2024 16:02:40 +0000 (UTC) From: Nuno Sa via B4 Relay Date: Tue, 02 Jul 2024 18:02:51 +0200 Subject: [PATCH 19/20] iio: imu: adis16475: make use of iio_for_each_active_channel() MIME-Version: 1.0 Message-Id: <20240702-dev-iio-masklength-private-v1-19-98193bf536a6@analog.com> References: <20240702-dev-iio-masklength-private-v1-0-98193bf536a6@analog.com> In-Reply-To: <20240702-dev-iio-masklength-private-v1-0-98193bf536a6@analog.com> To: linux-iio@vger.kernel.org, chrome-platform@lists.linux.dev, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719936157; l=891; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=R0wwlEsuLBVxnsU+A/xQqthiBloXGcKrV9R2Xe/WNOk=; b=ig8hNaFeuY+6AqHCCCLWYv++S5uIRb3T50cfV7rToGdVwa4/sz19fb3vXj3FPvwcRRv4fEkYs ipUbY1hCjTzBb5+pF1iDYBRZBlX4YQe8ZMXCQhzqRwIWF+ie83Ry+8w 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240702_090244_066123_82B76871 X-CRM114-Status: GOOD ( 12.13 ) 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: , Reply-To: nuno.sa@analog.com Cc: Alexandre Belloni , Lars-Peter Clausen , Michael Hennerich , Cosmin Tanislav , Claudiu Beznea , Guenter Roeck , Dmitry Rokosov , Benson Leung , Jonathan Cameron Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Alexandru Ardelean --- drivers/iio/imu/adis16475.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c index cf73c6f46c79d..1cc2a66a78ff3 100644 --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -1608,8 +1608,7 @@ static int adis16475_push_single_sample(struct iio_poll_func *pf) return -EINVAL; } - for_each_set_bit(bit, indio_dev->active_scan_mask, - indio_dev->masklength) { + iio_for_each_active_channel(indio_dev, bit) { /* * When burst mode is used, system flags is the first data * channel in the sequence, but the scan index is 7.