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]
Date:	Tue, 5 May 2009 16:32:12 +0200 (CEST)
From:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To:	Roel Kluin <roel.kluin@...il.com>
cc:	Greg KH <gregkh@...e.de>, axboe@...nel.dk,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] block/ps3: remove driver_data direct access of struct
 device

On Tue, 5 May 2009, Roel Kluin wrote:
> In the near future, the driver core is going to not allow direct access
> to the driver_data pointer in struct device.  Instead, the functions
> dev_get_drvdata() and dev_set_drvdata() should be used.  These functions
> have been around since the beginning, so are backwards compatible with
> all older kernel versions.
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>

Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>

Thanks, I'll add it to my list of ps3* patches for 2.6.31...

> diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
> index 8eddef3..8ecf1e0 100644
> --- a/drivers/block/ps3vram.c
> +++ b/drivers/block/ps3vram.c

> @@ -615,9 +615,9 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
>  	}
>  
>  	mutex_init(&priv->lock);
> -	dev->core.driver_data = priv;
> +	dev_set_drvdata(&dev->core, priv);
>  
> -	priv = dev->core.driver_data;
> +	priv = dev_get_drvdata(&dev->core);
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This line can actually be removed, while we're at it...

>  	/* Allocate XDR buffer (1MiB aligned) */
>  	priv->xdr_buf = (void *)__get_free_pages(GFP_KERNEL,

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@...ycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ