From patchwork Tue Jul 2 16:02:41 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: 13720014 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 A24ADC3065C for ; Tue, 2 Jul 2024 16:04:08 +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=iX15k1auQ0rzPVN6d0CQGgYSuNcrqz2ofHlHX1nH6dE=; b=ervwqTxbw3WuXhOZCJn4Uf6nUQ CW86Ckf95NOQ+AXn2nO59g6wWnyFZ8d3aDqEMvgEOqIbUp5S4ioIciA8MUkOeri/waodr0RLLMMka PF2jGjv5jfF5YK2665Lpw/SPMm7uYYFp7J4fNuZZBKzcAWdUunL+wk+G8nJ/AjI3hSn84Ou6KdTVZ dErwNyIBAEx7e56rK4xKmLr7oxtXPbF8xTQb2/pzzLBp9DBUvtVOpJoubOQ9oPFUy3JL4g0Z8flAE lxCAM43aJNrCC+36A8fFiaJM15Mensu3GgPcOkbcdNtAYrMJNJF49zI752SWxxofN/qQur3hpaNde rcYEYwxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOfz3-00000007Ir4-3Sqn; Tue, 02 Jul 2024 16:03:57 +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 1sOfxq-00000007IPf-1YCk for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 16:02:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 28E1061E9F; Tue, 2 Jul 2024 16:02:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 8729FC4AF0E; Tue, 2 Jul 2024 16:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719936159; bh=keSrboDdnEDk+BOxBBWN9hfl5VamPSjisDY1VWOq4Ew=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=SsV9sKspSexexI2F7IzaVFT8w//xU7W4Mv40yapmj4TvLS6iwz1xktAqRlhinQmF8 Yr+CGSRkpzMqrGJwugTeiKCKvctiBPdGjsiFOp1a9opSjpbbh2qp8ERNUjpcNhzthK jrD7uxA2XDaCGcdZRoxQG90v36z1n3RuGsvgs63MybgxQ5Da44EwBvX9ixDBHjowTV rYO0yvI0WhBa7/GsDKB8FlyeuRAWfHi7IYlxJAPiCN4oAdRs3ql7h2s2dS35KHO8XL U3kw4rAxWW198KiPxkEBNOcHShJacSs5ZAEY0oz+tUgM1/rpdAPhCwCpkbZEmjXhEq VMj0OKE4Uhu4Q== 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 7B0D7C3064D; Tue, 2 Jul 2024 16:02:39 +0000 (UTC) From: Nuno Sa via B4 Relay Date: Tue, 02 Jul 2024 18:02:41 +0200 Subject: [PATCH 09/20] iio: accel: fxls8962af-core: make use of iio_for_each_active_channel() MIME-Version: 1.0 Message-Id: <20240702-dev-iio-masklength-private-v1-9-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=1719936156; l=913; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=4mWpFN+edUepEAApNSzBRyHgoD70Vxqq6Y9OZGqmjrU=; b=Q5tLlYPDxHAbfMtvcRj971Vl0lxoxT3px4ZQXt19F8RlGGCkWemotJzujrMz5YE5MM54lGnKB JgnHzH/TqZuBQ0hxTLS1Ohr7dDn4xnXlVSx928Bol5OMxW2lV0tR0Cf 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_090242_525630_00611608 X-CRM114-Status: GOOD ( 11.31 ) 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/accel/fxls8962af-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index 4fbc01bda62e4..7adb8937cb4b6 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -968,8 +968,7 @@ static int fxls8962af_fifo_flush(struct iio_dev *indio_dev) int j, bit; j = 0; - for_each_set_bit(bit, indio_dev->active_scan_mask, - indio_dev->masklength) { + iio_for_each_active_channel(indio_dev, bit) { memcpy(&data->scan.channels[j++], &buffer[i * 3 + bit], sizeof(data->scan.channels[0])); }