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: <6c979da5-d913-e2d9-9766-478a50d905f7@enpas.org>
Date:   Wed, 6 Nov 2019 12:33:30 +0100
From:   Max Staudt <max@...as.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        linux-i2c@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 02/12] i2c: icy: convert to i2c_new_scanned_device

On 11/06/2019 10:50 AM, Wolfram Sang wrote:
> Move from the deprecated i2c_new_probed_device() to the new
> i2c_new_scanned_device(). Make use of the new ERRPTR if suitable.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---
>  drivers/i2c/busses/i2c-icy.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-icy.c b/drivers/i2c/busses/i2c-icy.c
> index 8382eb64b424..07baa4d8de39 100644
> --- a/drivers/i2c/busses/i2c-icy.c
> +++ b/drivers/i2c/busses/i2c-icy.c
> @@ -188,10 +188,10 @@ static int icy_probe(struct zorro_dev *z,
>  		ltc2990_info.fwnode = new_fwnode;
>  
>  		i2c->ltc2990_client =
> -			i2c_new_probed_device(&i2c->adapter,
> -					      &ltc2990_info,
> -					      icy_ltc2990_addresses,
> -					      NULL);
> +			i2c_new_scanned_device(&i2c->adapter,
> +					       &ltc2990_info,
> +					       icy_ltc2990_addresses,
> +					       NULL);

Looks good, thank you for patching this!

i2c_unregister_device() checks the pointer using IS_ERR_OR_NULL(), so the simple logic in i2c-icy (where the pointer is not checked on i2c_new_scanned_device()) still works.


Acked-by: Max Staudt <max@...as.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ