public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Antoniu Miclaus <antoniu.miclaus@analog.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num
Date: Sun, 25 May 2025 15:12:23 +0100	[thread overview]
Message-ID: <20250525151223.2f290fda@jic23-huawei> (raw)
In-Reply-To: <8b24ec167ebef4947eb9fe122d546ea8410bc6c2.camel@gmail.com>

On Tue, 20 May 2025 15:09:25 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:

> On Tue, 2025-05-20 at 14:01 +0300, Antoniu Miclaus wrote:
> > Extend the check for st->num_lanes to ensure it is not greater
> > than 2, preventing invalid configurations.
> > 
> > The AD4080 only supports up to 2 data lanes.
> > 
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> > ---  
> 
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
This is fine. I'll pick it up once I have a fixes tag for patch 1.
Send a v2 with that in place and picking up
Nuno's tags.

Thanks,

Jonathan

> 
> >  drivers/iio/adc/ad4080.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
> > index c36eb41d738a..6e61787ed321 100644
> > --- a/drivers/iio/adc/ad4080.c
> > +++ b/drivers/iio/adc/ad4080.c
> > @@ -516,7 +516,7 @@ static int ad4080_properties_parse(struct ad4080_state
> > *st)
> >  
> >  	st->num_lanes = 1;
> >  	device_property_read_u32(dev, "adi,num-lanes", &st->num_lanes);
> > -	if (!st->num_lanes)
> > +	if (!st->num_lanes || st->num_lanes > 2)
> >  		return dev_err_probe(dev, -EINVAL,
> >  				     "Invalid 'adi,num-lanes' value: %u",
> >  				     st->num_lanes);  


  reply	other threads:[~2025-05-25 14:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 11:01 [PATCH 1/2] iio: adc: ad4080: use lowercase device name Antoniu Miclaus
2025-05-20 11:01 ` [PATCH 2/2] iio: adc: ad4080: extend check for data lanes num Antoniu Miclaus
2025-05-20 14:09   ` Nuno Sá
2025-05-25 14:12     ` Jonathan Cameron [this message]
2025-05-20 14:08 ` [PATCH 1/2] iio: adc: ad4080: use lowercase device name Nuno Sá
2025-05-25 14:11   ` Jonathan Cameron

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=20250525151223.2f290fda@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noname.nuno@gmail.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