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] [day] [month] [year] [list]
Date:	Tue, 30 Sep 2014 13:08:58 +0300
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	Fabian Frederick <fabf@...net.be>, <linux-kernel@...r.kernel.org>
CC:	<daniel.vetter@...el.com>,
	"James E.J. Bottomley" <jejb@...isc-linux.org>,
	Helge Deller <deller@....de>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	<linux-parisc@...r.kernel.org>, <linux-fbdev@...r.kernel.org>
Subject: Re: [PATCH 1/6] video: fbdev: stifb.c: use container_of to resolve
 stifb_info from fb_info

Hi,

On 17/09/14 22:00, Fabian Frederick wrote:
> Use container_of instead of casting first structure member.
> 
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
> PARISC cross-compiled but untested.
> 
>  drivers/video/fbdev/stifb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
> index cfe8a2f..86621fa 100644
> --- a/drivers/video/fbdev/stifb.c
> +++ b/drivers/video/fbdev/stifb.c
> @@ -918,7 +918,7 @@ static int
>  stifb_setcolreg(u_int regno, u_int red, u_int green,
>  	      u_int blue, u_int transp, struct fb_info *info)
>  {
> -	struct stifb_info *fb = (struct stifb_info *) info;
> +	struct stifb_info *fb = container_of(info, struct stifb_info, info);
>  	u32 color;
>  
>  	if (regno >= NR_PALETTE)
> @@ -978,7 +978,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green,
>  static int
>  stifb_blank(int blank_mode, struct fb_info *info)
>  {
> -	struct stifb_info *fb = (struct stifb_info *) info;
> +	struct stifb_info *fb = container_of(info, struct stifb_info, info);
>  	int enable = (blank_mode == 0) ? ENABLE : DISABLE;
>  
>  	switch (fb->id) {
> 

Thanks, queuing the series for 3.18.

 Tomi



Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ