public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH fix-3.8] video: vt8500: Fix X crash when initializing framebuffer.
Date: Fri, 28 Dec 2012 22:59:57 +0300	[thread overview]
Message-ID: <50DDFA3D.1000506@mvista.com> (raw)
In-Reply-To: <1356567943-3836-1-git-send-email-linux@prisktech.co.nz>

Hello.

On 12/27/2012 03:25 AM, Tony Prisk wrote:

> This patch adds support for .fb_check_var which is required when
> X attempts to initialize the framebuffer. The only supported
> resolution is the native resolution of the LCD panel, so we test
> against the resolution supplied from the DT panel definition.

> Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
> ---
>  drivers/video/wm8505fb.c |   25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)

> diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c
> index 77539c1..c84e376 100644
> --- a/drivers/video/wm8505fb.c
> +++ b/drivers/video/wm8505fb.c
[...]
> @@ -248,8 +256,21 @@ static int wm8505fb_blank(int blank, struct fb_info *info)
>  	return 0;
>  }
>  
> +static int wm8505fb_check_var(struct fb_var_screeninfo *var,
> +			      struct fb_info *info)
> +{
> +	struct wm8505fb_info *fbi = to_wm8505fb_info(info);
> +        if (!fbi) return -EINVAL;
> +
> +	if (info->var.bits_per_pixel != fbi->lcd_params.color_depth) return -EINVAL;
> +	if (info->var.xres != fbi->lcd_params.pixel_width) return -EINVAL;
> +	if (info->var.yres != fbi->lcd_params.pixel_height) return -EINVAL;
> +	return 0;
> +}
> +

[...]

$ scripts/checkpatch.pl
patches/video-vt8500-Fix-X-crash-when-initializing-framebuffer.patch
ERROR: code indent should use tabs where possible
#42: FILE: drivers/video/wm8505fb.c:263:
+        if (!fbi) return -EINVAL;$

WARNING: please, no spaces at the start of a line
#42: FILE: drivers/video/wm8505fb.c:263:
+        if (!fbi) return -EINVAL;$

ERROR: trailing statements should be on next line
#42: FILE: drivers/video/wm8505fb.c:263:
+        if (!fbi) return -EINVAL;

WARNING: line over 80 characters
#44: FILE: drivers/video/wm8505fb.c:265:
+	if (info->var.bits_per_pixel != fbi->lcd_params.color_depth) return -EINVAL;

ERROR: trailing statements should be on next line
#44: FILE: drivers/video/wm8505fb.c:265:
+	if (info->var.bits_per_pixel != fbi->lcd_params.color_depth) return -EINVAL;

ERROR: trailing statements should be on next line
#45: FILE: drivers/video/wm8505fb.c:266:
+	if (info->var.xres != fbi->lcd_params.pixel_width) return -EINVAL;

ERROR: trailing statements should be on next line
#46: FILE: drivers/video/wm8505fb.c:267:
+	if (info->var.yres != fbi->lcd_params.pixel_height) return -EINVAL;

total: 5 errors, 2 warnings, 49 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

patches/video-vt8500-Fix-X-crash-when-initializing-framebuffer.patch has style
problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

WBR, Sergei

      parent reply	other threads:[~2012-12-28 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27  0:25 [PATCH fix-3.8] video: vt8500: Fix X crash when initializing framebuffer Tony Prisk
2012-12-27  1:08 ` Florian Tobias Schandinat
2012-12-28 19:59 ` Sergei Shtylyov [this message]

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=50DDFA3D.1000506@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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