public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Atharv Dubey <atharvd440@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	marcelo.schmitt@analog.com, mazziesaccount@gmail.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/11] iio: ad_sigma_delta: replace deprecated iio_push_to_buffers_with_timestamp()
Date: Thu, 19 Mar 2026 16:23:01 +0530	[thread overview]
Message-ID: <f08030fc-ebbc-41b3-9237-a3a646ddd7e3@gmail.com> (raw)
In-Reply-To: <20260316181943.50acd1a3@jic23-huawei>

Hi Jonathan,

On 3/16/26 23:49, Jonathan Cameron wrote:
> On Mon, 16 Mar 2026 22:57:27 +0530
> Atharv Dubey <atharvd440@gmail.com> wrote:
>
>> iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
>> iio_push_to_buffers_with_ts(), which takes the buffer size as an
>> argument and helps avoid potential buffer overflows.
>>
>> Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
> Hi Atharv,
>
> Thank for you for your patch.
>
>
>> ---
>>   drivers/iio/adc/ad_sigma_delta.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
>> index 7852884703b0..73f3069da987 100644
>> --- a/drivers/iio/adc/ad_sigma_delta.c
>> +++ b/drivers/iio/adc/ad_sigma_delta.c
>> @@ -636,7 +636,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
>>   	 * once, there is no need for sample number tracking.
>>   	 */
>>   	if (sigma_delta->active_slots == 1) {
>> -		iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp);
>> +		iio_push_to_buffers_with_ts(indio_dev, data, sizeof(data), pf->timestamp);
> What is sizeof(data) and why is that the right value to pass as the new parameter?
>
>>   		goto irq_handled;
>>   	}
>>   
>> @@ -662,8 +662,8 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
>>   
>>   	if (sigma_delta->current_slot == sigma_delta->active_slots) {
>>   		sigma_delta->current_slot = 0;
>> -		iio_push_to_buffers_with_timestamp(indio_dev, sigma_delta->samples_buf,
>> -						   pf->timestamp);
>> +		iio_push_to_buffers_with_ts(indio_dev, sigma_delta->samples_buf,
>> +				sizeof(sigma_delta->sampkes_buf), pf->timestamp);
> Likewise. What value does the new parameter take?
>
> I'm not going to review any more of this version of the series given these are
> both incorrect in the first patch.
>
> Jonathan


You are right, both the fixes are incorrect let me try more on this. 
I'll send a smaller patch series first and mark it as an RFC.

>
>>   	}
>>   
>>   irq_handled:
>   

Regards,
Atharv


  reply	other threads:[~2026-03-19 10:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 17:27 [PATCH 00/11] iio: adc: replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
2026-03-16 17:27 ` Atharv Dubey
2026-03-16 19:56   ` Andy Shevchenko
2026-03-19 10:47     ` Atharv Dubey
2026-03-16 17:27 ` [PATCH 01/11] iio: ad_sigma_delta: " Atharv Dubey
2026-03-16 18:19   ` Jonathan Cameron
2026-03-19 10:53     ` Atharv Dubey [this message]
2026-03-16 17:27 ` [PATCH 02/11] iio: ad7766: " Atharv Dubey
2026-03-16 17:27 ` [PATCH 03/11] iio: adc : ads7950 : " Atharv Dubey
2026-03-16 17:27 ` [PATCH 04/11] iio: adc : cc10001 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 05/11] iio: adc : ad7887 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 06/11] iio: adc : hx711 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 07/11] iio: adc : at91 " Atharv Dubey
2026-03-16 17:27 ` [PATCH 08/11] iio: adc : ad799x " Atharv Dubey
2026-03-16 17:27 ` [PATCH 09/11] iio: adc : adc161s626 " Atharv Dubey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f08030fc-ebbc-41b3-9237-a3a646ddd7e3@gmail.com \
    --to=atharvd440@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox