linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: InKi Dae <daeinki@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, kyungmin.park@samsung.com
Subject: Re: [PATCH] added S6E63M0 AMOLED LCD Panel driver.
Date: Tue, 30 Mar 2010 19:55:01 -0400	[thread overview]
Message-ID: <20100330195501.747515e9.akpm@linux-foundation.org> (raw)
In-Reply-To: <90b950fc1003301941r69dc5ce1ida64b590646049a7@mail.gmail.com>

On Wed, 31 Mar 2010 11:41:54 +0900 InKi Dae <daeinki@gmail.com> wrote:

> Hi Andrew,
> 
> all the calls to s6e63m0_panel_send_sequence() would return -EINVAL.
> by api_async() of driver/spi/spi.c

No, spi_async() does

	master->transfer(spi, message);

which can return at least EIO, EINPROGRESS, EINVAL or ETIMEDOUT.

> so I think that those return values aren't changed to other.
> 
> and final step is to check only whether the return value is 0 or not.
> if you still think that this code has minor problem or you want it to
> be corrected
> then I will patch this code to be corrected anytime.

It's a bug.

Also s6e63m0_power_on() is sloppy.  It again or's together disparate
errnos.  Then if _anything_ failed it returns hardwired -EIO, but it
should instead propagate the callee's errno back up to the caller.

And s6e63m0_power_on() can return -EFAULT in several places, which is
nonsensical.

None of this is very critical, just ... sloppy.

  reply	other threads:[~2010-03-30 23:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26  3:24 [PATCH] added S6E63M0 AMOLED LCD Panel driver InKi Dae
2010-03-30 23:02 ` Andrew Morton
2010-03-30 23:24   ` [Linux-fbdev-devel] " H Hartley Sweeten
2010-03-31  2:56     ` InKi Dae
2010-03-31  2:41   ` InKi Dae
2010-03-30 23:55     ` Andrew Morton [this message]
2010-04-27 19:05       ` Andrew Morton
2010-04-29  3:30         ` InKi Dae

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=20100330195501.747515e9.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=daeinki@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).