Re: [PATCH 2/8] iio: adc: adi-axi-adc: only error out in major version mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 19 Apr 2024 17:36:45 +0200
Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@xxxxxxxxxx> wrote:

> From: Nuno Sa <nuno.sa@xxxxxxxxxx>
> 
> The IP core only has breaking changes when there major version changes.
> Hence, only match the major number. This is also in line with the other
> core ADI has upstream. The current check for erroring out
> 'expected_version > current_version"' is then wrong as we could just
> increase the core major with breaking changes and that would go
> unnoticed.
> 
> Fixes: ef04070692a2 ("iio: adc: adi-axi-adc: add support for AXI ADC IP core")
> Signed-off-by: Nuno Sa <nuno.sa@xxxxxxxxxx>
You did point out in the cover letter that there were some unrelated
changes in this series.   Would have been better to just pull the out as
a precursor and hence not have to mention it!

Anyhow, I'll pick at least this one up now but I'm not rushing it in as
doesn't feel urgent.  Applied to the togreg branch of iio.git and pushed out as
testing.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/adi-axi-adc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
> index 4156639b3c8bd..a543b91124b07 100644
> --- a/drivers/iio/adc/adi-axi-adc.c
> +++ b/drivers/iio/adc/adi-axi-adc.c
> @@ -207,9 +207,9 @@ static int adi_axi_adc_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (*expected_ver > ver) {
> +	if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(*expected_ver)) {
>  		dev_err(&pdev->dev,
> -			"IP core version is too old. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
> +			"Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
>  			ADI_AXI_PCORE_VER_MAJOR(*expected_ver),
>  			ADI_AXI_PCORE_VER_MINOR(*expected_ver),
>  			ADI_AXI_PCORE_VER_PATCH(*expected_ver),
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux