linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Fabian Frederick <fabf@skynet.be>, linux-kernel@vger.kernel.org
Cc: daniel.vetter@intel.com,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	Helge Deller <deller@gmx.de>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-parisc@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/6] video: fbdev: stifb.c: use container_of to resolve stifb_info from fb_info
Date: Tue, 30 Sep 2014 10:08:58 +0000	[thread overview]
Message-ID: <542A813A.6010603@ti.com> (raw)
In-Reply-To: <1410980419-5326-2-git-send-email-fabf@skynet.be>

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

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@skynet.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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-09-30 10:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 19:00 [PATCH 0/6] video: fbdev: use container_of where possible Fabian Frederick
2014-09-17 19:00 ` [PATCH 1/6] video: fbdev: stifb.c: use container_of to resolve stifb_info from fb_info Fabian Frederick
2014-09-30 10:08   ` Tomi Valkeinen [this message]
2014-09-17 19:00 ` [PATCH 2/6] video: fbdev: sa1100fb.c: use container_of to resolve sa1100fb_info " Fabian Frederick
2014-09-17 19:00 ` [PATCH 3/6] video: fbdev: controlfb.c: use container_of to resolve fb_info_control " Fabian Frederick
2014-09-17 19:00 ` [PATCH 4/6] video: fbdev: cyber2000fb.c: use container_of to resolve cfb_info " Fabian Frederick
2014-09-17 19:00 ` [PATCH 5/6] video: fbdev: pxafb.c: use container_of to resolve pxafb_info/layer " Fabian Frederick
2014-09-17 19:00 ` [PATCH 6/6] video: fbdev: valkyriefb.c: use container_of to resolve fb_info_valkyrie " Fabian Frederick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542A813A.6010603@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=daniel.vetter@intel.com \
    --cc=deller@gmx.de \
    --cc=fabf@skynet.be \
    --cc=jejb@parisc-linux.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).