lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6caba41c-3db2-90c4-e1f7-2392162e2b0a@gmail.com>
Date:   Fri, 21 Apr 2023 06:44:28 +0300
From:   Matti Vaittinen <mazziesaccount@...il.com>
To:     Mehdi Djait <mehdi.djait.k@...il.com>, jic23@...nel.org
Cc:     krzysztof.kozlowski+dt@...aro.org,
        andriy.shevchenko@...ux.intel.com, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 2/5] iio: accel: kionix-kx022a: Warn on failed matches
 and assume compatibility

On 4/20/23 23:22, Mehdi Djait wrote:
> Avoid error returns on a failure to match and instead just warn with
> assumption that we have a correct dt-binding telling us that
> some new device with a different ID is backwards compatible.
> 
> Signed-off-by: Mehdi Djait <mehdi.djait.k@...il.com>
> ---
> v2:
> - no changes, this patch is introduced in the v2
> 
>   drivers/iio/accel/kionix-kx022a.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
> index f98393d74666..70530005cad3 100644
> --- a/drivers/iio/accel/kionix-kx022a.c
> +++ b/drivers/iio/accel/kionix-kx022a.c
> @@ -1038,9 +1038,7 @@ int kx022a_probe_internal(struct device *dev)
>   		return dev_err_probe(dev, ret, "Failed to access sensor\n");
>   
>   	if (chip_id != KX022A_ID) {
> -		dev_err(dev, "unsupported device 0x%x\n", chip_id);
> -		return -EINVAL;
> -	}
> +		dev_warn(dev, "unsupported device 0x%x\n", chip_id);

Just a 'nit' - no need to re-spin the series for this if there is no 
other changes requested.

Maybe a slightly better wording here would be "unknown device"? If I am 
not mistaken the code proceeds because device is assumed to be supported.

Jonathan, do you think this change is worth backporting? If yes, then we 
might need a Fixes tag.

Acked-by: Matti Vaittinen <mazziesaccount@...il.com>

>   
>   	irq = fwnode_irq_get_byname(fwnode, "INT1");
>   	if (irq > 0) {

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ