mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Fabio Estevam <festevam@gmail.com>
Cc: kernel@pengutronix.de,
	Fabio Estevam <fabio.estevam@freescale.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, FlorianSchandinat@gmx.de
Subject: Re: [PATCH v2] video: imxfb: Do not crash on reboot
Date: Tue, 9 Oct 2012 06:42:01 +0200	[thread overview]
Message-ID: <20121009044201.GA4640@sapphire.tkos.co.il> (raw)
In-Reply-To: <1349735038-19196-1-git-send-email-festevam@gmail.com>

Hi Fabio,

On Mon, Oct 08, 2012 at 07:23:58PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Issuing a "reboot" command after the LCD times out causes the following
> warnings:

[snip]

> @@ -513,47 +514,53 @@ static void imxfb_exit_backlight(struct imxfb_info 
> *fbi)
>  
>  static void imxfb_enable_controller(struct imxfb_info *fbi)
>  {
> -	pr_debug("Enabling LCD controller\n");
> +	if (!fbi->enabled) {
> +		pr_debug("Enabling LCD controller\n");

Won't it be simpler to just do:

    if (fbi->enabled)
        return;

instead of adding another nesting level to the whole routine?

>  static void imxfb_disable_controller(struct imxfb_info *fbi)
>  {
> -	pr_debug("Disabling LCD controller\n");
> +	if (fbi->enabled) {
> +		pr_debug("Disabling LCD controller\n");

ditto (with inverted logic).

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

      reply	other threads:[~2012-10-09  4:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 22:23 Fabio Estevam
2012-10-09  4:42 ` Baruch Siach [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=20121009044201.GA4640@sapphire.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=FlorianSchandinat@gmx.de \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®