From patchwork Sun Apr 13 10:34:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 14049272 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 082AA2AD3E for ; Sun, 13 Apr 2025 10:35:13 +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=1744540513; cv=none; b=DjOdFHeeroJhe6nlO5JJ2kS+XAMBJyK+lqgnmEMmY0zcvmRJm0VzaewnYiX48P46vm9IaAD8PdW+iVc0iQ/+u0G3o4RrXpvBEuTRwe4OWMQ4AeeSrYcAJ/GQB/B+IWAin6ZD955YrWq4HCNthcIrD3ljKwQMjsLi5Cl29v6wLOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744540513; c=relaxed/simple; bh=SgZyGUJuQEdf1UndClsPKF0Kjv02T+l2y0oSN6uEi4o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pxG5t1eROE776gUZDK5Cl2lM7eZxq5Le7HI2OaGVxbBtjB2O0aOTYIfssMZQcUXHJ3cuPtrFCLNOBti6XAAfQpSY8AWyVsvZDHBqdAvd+U1pX8VA+k6EXjsZ8Jnjl8HZTszTJCyhvGp74X458Vx0Lla5Vg14l8y0nIVZ9SlTerU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SJnUHSOe; 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="SJnUHSOe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B89A2C4CEEB; Sun, 13 Apr 2025 10:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744540512; bh=SgZyGUJuQEdf1UndClsPKF0Kjv02T+l2y0oSN6uEi4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SJnUHSOemdMSuHVyDjG0wROniuR9FfU6j0WZO4BKScwiJiwTGKRxSoy0drnMHRzAM /rUaYQtjlpplty3iOFz+89DfbYfik00zLMo+S9pGDjaEIYfNMwbg1zIhj/fzxS5hlt 0Xpa1ztAOkTdNpB20D7zNUDSY5uCI6SMMj6M/inqoZ9zPZCeKCShykGkiqpXpZAKoG zLGOJ847q4m0Rzi4iGnb5yW+kbT+VVPIyK0TIPB9aGO5fkEBwOCLwZoifynmzkEwey /zHdEbbpj65rw8hrydoaBio0f0dk2wKDbeKbWJp+xJ0K2/5rJQkNUO9vi09xpK2AWJ dAwbiHlooA3cA== From: Jonathan Cameron To: linux-iio@vger.kernel.org, David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko Cc: Jonathan Cameron Subject: [PATCH v3 07/20] iio: dummy: Switch to iio_push_to_buffers_with_ts() and provide size of storage Date: Sun, 13 Apr 2025 11:34:30 +0100 Message-ID: <20250413103443.2420727-8-jic23@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250413103443.2420727-1-jic23@kernel.org> References: <20250413103443.2420727-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Provide the storage size so that the helper can sanity check that it is large enough for the configured channels. Reviewed-by: Nuno Sá Signed-off-by: Jonathan Cameron --- v3: Updates due to change in previous patch. --- drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dummy/iio_simple_dummy_buffer.c b/drivers/iio/dummy/iio_simple_dummy_buffer.c index d0a7343e1b35..e35e0596cbfb 100644 --- a/drivers/iio/dummy/iio_simple_dummy_buffer.c +++ b/drivers/iio/dummy/iio_simple_dummy_buffer.c @@ -83,8 +83,8 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) iio_for_each_active_channel(indio_dev, j) scan->data[i++] = fakedata[j]; - iio_push_to_buffers_with_timestamp(indio_dev, scan, - iio_get_time_ns(indio_dev)); + iio_push_to_buffers_with_ts(indio_dev, scan, sizeof(*scan), + iio_get_time_ns(indio_dev)); kfree(scan); done: