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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZjiVBkkdUAZ0B/vb@kuha.fi.intel.com>
Date: Mon, 6 May 2024 11:29:58 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Javier Carrasco <javier.carrasco@...fvision.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Abdel Alkuor <abdelalkuor@...tab.com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] usb: typec: tipd: rely on i2c_get_match_data()

On Mon, Apr 29, 2024 at 03:35:59PM +0200, Javier Carrasco wrote:
> The first thing i2c_get_match_data() does is calling
> device_get_match_data(), which already checks if there is a fwnode.
> 
> Remove explicit usage of device_get_match_data() as it is already
> included in i2c_get_match_data().
> 
> Signed-off-by: Javier Carrasco <javier.carrasco@...fvision.net>

Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

> ---
>  drivers/usb/typec/tipd/core.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 191f86da283d..ad76dbd20e65 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1365,10 +1365,7 @@ static int tps6598x_probe(struct i2c_client *client)
>  			TPS_REG_INT_PLUG_EVENT;
>  	}
>  
> -	if (dev_fwnode(tps->dev))
> -		tps->data = device_get_match_data(tps->dev);
> -	else
> -		tps->data = i2c_get_match_data(client);
> +	tps->data = i2c_get_match_data(client);
>  	if (!tps->data)
>  		return -EINVAL;
>  
> 
> -- 
> 2.40.1

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ