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: <56BF4E1F.2030208@linux.vnet.ibm.com>
Date:	Sat, 13 Feb 2016 10:39:11 -0500
From:	Stefan Berger <stefanb@...ux.vnet.ibm.com>
To:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
	tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev

On 02/12/2016 07:04 PM, Jason Gunthorpe wrote:
> This is a hold over from before the struct device conversion.
>
> - All prints should be using &chip->dev, which is the Linux
>    standard. This changes prints to use tpm0 as the device name,
>    not the PnP/etc ID.
> - The few places involving sysfs/modules that really do need the
>    parent just use chip->dev.parent instead
> - We no longer need to get_device(pdev) in any places since it is no
>    longer used by any of the code. The kref on the parent is held
>    by the device core during device_add and dropped in device_del
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
> ---

> @@ -347,8 +347,8 @@ static int i2c_nuvoton_recv(struct tpm_chip *chip, u8 *buf, size_t count)
>    */
>   static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len)
>   {
> -	struct device *dev = chip->pdev;
> -	struct i2c_client *client = to_i2c_client(dev);
> +	struct device *dev = &chip->dev;
This looks wrong or are you fixing a bug here? chip->dev.parent ?
> +	struct i2c_client *client = to_i2c_client(chip->dev.parent);

Does this need to be replaced ?

     Stefan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ