From patchwork Tue Jul 2 16:02:38 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: 13719968 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 9D7CA1BD00B; Tue, 2 Jul 2024 16:02:39 +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=1719936159; cv=none; b=ui8yubEu8687tVh/1PTxU0Jx+dvDp/Rl3A98h7JC8qC/XCJEW1f683AGO3XP5uG19prrRQUmRHUkbR9F++Gi7YEyMoF/GepMHVhYKvgOO1/ZWLUz6+4CAk0AdS7K/QnWa4aShUrItN5/qAdCN6u7IRw8brtaxyJ0e02YPLW91uU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719936159; c=relaxed/simple; bh=xVxyFNnUOQfVYMK63TbRRb8qAbFJCDubROXQiuFnah4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RjWf/EWABLQV8WBZKnh5kJ3E6gR37lVi35eAMpMHdLGssiiVdql702YmjeoWO/WbuBwmgXYbjFuo7Czgj2BMAp94NLCceQp06QY79ueU3Nj/iLtjj8KSK3SHZG8b1H64DxkCdJvz6vr4ztE3jzf9AMmVVmOd0UrHRRFo4R4k50k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZQZWwVx2; 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="ZQZWwVx2" Received: by smtp.kernel.org (Postfix) with ESMTPS id 56C86C4AF13; 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=xVxyFNnUOQfVYMK63TbRRb8qAbFJCDubROXQiuFnah4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ZQZWwVx2YXn5Syk2PbUyJCw75rbwjjtC4lW3XJX5qh4WdtutMDDht2L2tTXeo6Nv1 DtRXewhesrqNKXOf6l7+Rt4sxv2qCzHVuTrOunueV4EGPHuG+tLC6UB/odygk7+Cv+ 6P1PtQ55FhyVD8fopiuaUXmmzxOGfxH/lQC+kQOMNMGJlffzsMWOG+nCsE3BEgGTbL xcFBhjf8jZ7ZLBSInPdpKP5m1NaZYeTzUKUkaMSSfS1KSQoF48Q+kPJlWFnMnwh55A mIIuDjY3al+roxjtn3Ey9DwzG9zpLAM4lPruROiBv2yXIARR1f6raLAVf6jTnepp6j P9qxKJ8SJpQxg== 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 4E1ACC3065C; Tue, 2 Jul 2024 16:02:39 +0000 (UTC) From: Nuno Sa via B4 Relay Date: Tue, 02 Jul 2024 18:02:38 +0200 Subject: [PATCH 06/20] iio: accel: bma180: 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: <20240702-dev-iio-masklength-private-v1-6-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 Cc: Jonathan Cameron , Lars-Peter Clausen , Cosmin Tanislav , Michael Hennerich , Benson Leung , Guenter Roeck , Dmitry Rokosov , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719936156; l=852; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=cf8nH+C7ga2MXuJGs1LhW+Vpw2HhW0TtDxm5BRQV7AE=; b=uqji2JCwXdfwSMPdRVcuAb/d2Dl34B6/KSFtjmrqUxMgkRWE3YlbPtvfqbNr5hbh197ihNyIa +mYYUYZi9KLAkXqmYe/W6FDoDUOXPleO9cilkhT4a4DzC44FcRaDbeh 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 Reviewed-by: Alexandru Ardelean --- drivers/iio/accel/bma180.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 6581772cb0c46..2445a0f7bc2ba 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -876,8 +876,7 @@ static irqreturn_t bma180_trigger_handler(int irq, void *p) mutex_lock(&data->mutex); - for_each_set_bit(bit, indio_dev->active_scan_mask, - indio_dev->masklength) { + iio_for_each_active_channel(indio_dev, bit) { ret = bma180_get_data_reg(data, bit); if (ret < 0) { mutex_unlock(&data->mutex);