From patchwork Tue Jul 2 16:02:39 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: 13720008 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 55644C30658 for ; Tue, 2 Jul 2024 16:03: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: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=HF1OFAq7oTABoMSf6XtFZDaseS59km2/VizdLm8wpAU=; b=glhRn7tF/am7xIUZ4Ns2bsI4Af +gkVpU0WHX9UOd/+VMf9hw/krrbTZ62HwmQtR1EJCFwB81mcxykLlfD1Kmkoe8gPQYOIPg464exni jr1ph3fqNUdQ/84VIWaw08GnnmEroBlMk/wiCxf31yxqV5hBFKe/jH3e//L0gnhvszhZQNal2WDwU nnFJbhRfdJGGogOy6vAFXmgFDG/rWc2wQBk01hE30uFxW647046BQd0CS/XTBdEzUTcuUgetS02+W ELew1st+woPB98YpqwCZfbVUZ1qG4Ph5xs6lyymTv0KsMhp4f2ElrcUfhC73hVfifhYdkM/ncTQmF KxMveKTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOfyA-00000007IWO-2s9o; Tue, 02 Jul 2024 16:03:02 +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 1sOfxo-00000007IOI-2j3R for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 16:02:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1810961E9E; Tue, 2 Jul 2024 16:02:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 62CE6C4AF15; 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=HiXT5JNAR/1VnVUe+f4ZpB2y/EtlWF8H9g7WziIDIOk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=g9zkoQwcrhJCIJbGkZ2UnJ2K6vM5cQ5NT1hwVFH1T4YYHPFWPhGrxMtZgOvxipKzv B4ufyTGUezxkTuIpeBcVrkUZGo9FF1gtu9MZLH0V+wLhze+SI8uP8HyBkfEPanA5wb qayOlb/pZ+qRxMK/WGRwSqgCgY7QRfpKF5seY+ozhwqndUjCQuVO/ewSbceCQLMS/O bvAYkEuoXob1XiWpzWLKzXBBVidgSR7eOJVq9xqVx33/WuCkOsj2eDJ9raqT4iOOCb l/O2CVbYXpwqgKlnA0XHL3+PafonA+nvnnHn8FQlJQ47/QJdzPQFfv/fDwTbUOj2BS 8WqN/hV0oyszg== 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 5B51DC3064D; Tue, 2 Jul 2024 16:02:39 +0000 (UTC) From: Nuno Sa via B4 Relay Date: Tue, 02 Jul 2024 18:02:39 +0200 Subject: [PATCH 07/20] iio: accel: bmc150-accel-core: make use of iio_for_each_active_channel() MIME-Version: 1.0 Message-Id: <20240702-dev-iio-masklength-private-v1-7-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=922; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=JeCIOP4qgOR1Vu/Iu0Qe9nBtR5DIWcMVPhJ4pTpIOtQ=; b=/2w5q3UWgYNzczpKhdhjLtwr+/NVWDbhJ9/6z6VmYIYt6PsaG52LAInaeclbeVx47gtB/KIA7 Fg5QC9lLSHnDagmgywq6G+tpSSB5XobU6izlnRNijyC3zDtfltQ7gVV 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_090240_790491_33588532 X-CRM114-Status: GOOD ( 10.96 ) 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/bmc150-accel-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index ae0cd48a3e293..03121d020470e 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -1007,8 +1007,7 @@ static int __bmc150_accel_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]));