linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: fsl: fix kernel crash when diu_ops is not implemented
Date: Tue, 24 Nov 2015 17:05:30 +0000	[thread overview]
Message-ID: <1448384730.27264.349.camel@freescale.com> (raw)
In-Reply-To: <1448346450-47403-1-git-send-email-dongsheng.wang@freescale.com>

On Tue, 2015-11-24 at 12:02 -0500, Timur Tabi wrote:
> On Tue, Nov 24, 2015 at 11:55 AM, Scott Wood <scottwood@freescale.com>
> wrote:
> 
> > > Well, if you're concern is that there's no platform code, then there
> > > should be a check that says, "see if there's any platform code", not
> > > "let's check this obscure function and abort without explanation if
> > > it's not initialized."
> > 
> > Do you have a *specific* better way to "see if there's any platform code"?
> 
> Well, for one thing, the check should be done in the _init function,
> not the _probe. 

I asked Dongsheng to put it in probe() during internal review because at the
time he was printing an error, and I didn't want the error to be printed if
the device wasn't present.  Again, there's another non-bugfix patch pending
that moves all the rest into probe() where it belongs.

>  Secondly, it should be documented as such, e.g. "/*
> Check to see that we have platform code that initializes diu_ops.  If
> not, then abort. */".

OK.

> Third, you should probably add a boolean field
> to platform_diu_data_ops that gets set to True if/when the platform
> code initializes the rest of the structure.

Why do you want to complicate a simple bugfix with a requirement to modify all
platforms that use the driver, introducing a possible regression if one is
missed?

-Scott


  parent reply	other threads:[~2015-11-24 17:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24  6:27 [PATCH] video: fbdev: fsl: fix kernel crash when diu_ops is not implemented Dongsheng Wang
2015-11-24 10:46 ` Tomi Valkeinen
2015-11-24 11:01 ` Wang Dongsheng
2015-11-24 16:04 ` Timur Tabi
2015-11-24 16:12 ` Timur Tabi
2015-11-24 16:15 ` Scott Wood
2015-11-24 16:15 ` Tomi Valkeinen
2015-11-24 16:54 ` Timur Tabi
2015-11-24 16:55 ` Scott Wood
2015-11-24 16:56 ` Timur Tabi
2015-11-24 16:57 ` Wang Dongsheng
2015-11-24 16:59 ` Scott Wood
2015-11-24 17:00 ` Scott Wood
2015-11-24 17:02 ` Timur Tabi
2015-11-24 17:02 ` Wang Dongsheng
2015-11-24 17:05 ` Timur Tabi
2015-11-24 17:05 ` Scott Wood [this message]
2015-11-24 17:06 ` Timur Tabi
2015-11-24 17:10 ` Scott Wood
2015-11-24 17:16 ` Timur Tabi
2015-11-24 17:17 ` Scott Wood
2015-12-01  8:43 ` Wang Dongsheng
2015-12-01 14:53 ` Timur Tabi

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=1448384730.27264.349.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=linux-fbdev@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;
as well as URLs for NNTP newsgroup(s).