All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Vinay Simha <simhavcs@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Archit Taneja <archit.taneja@gmail.com>,
	Rob Clark <robdclark@gmail.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	John Stultz <john.stultz@linaro.org>,
	David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v7 2/2] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel
Date: Mon, 11 Jul 2016 15:12:49 +0100	[thread overview]
Message-ID: <CACvgo52+M0Rv4P5+GPn3p0xqzThcHyBqWFrbiw1hTBbuQ=RKFw@mail.gmail.com> (raw)
In-Reply-To: <CAGWqDJ4FVBSgHwL_7Y0pQU4CwgxTLq6qOq981G-ke9Kwr3YpkA@mail.gmail.com>

On 11 July 2016 at 13:31, Vinay Simha <simhavcs@gmail.com> wrote:
> emil,
>
> As you had suggested to drop the spurious returns in
> jdi_panel_unprepare and drop the return itself.
> But as i had mentioned earlier , we cannot drop the return function
> and void for jdi_panel_unprepare , since the drm fun* requires int as
> return type (drm_panel_funcs .unprepare).
>
> please do re-point out if i had still missed anything.
>
Simple steps:
 - forget/ignore anything you know about the driver for a moment.
 - note: existing DRM interfaces cannot be changed.
 - teardown path(s) should _not_ return prematurely. be that within
the function itself or any of the functions that it uses.

Now put the above into practise:
 - jdi_panel_unprepare, should _not_ return if jdi_panel_off fails.
 - similarly, _everything_ in jdi_panel_off should be executed, hence
one can drop the return type all together.
 - bonus points for inlining the {2,4} line helpers
jdi_panel_{on,off}. don't bother with this if it makes things too
complex/confusing from your POV.

If the above is still ambiguous, just copy/pasta from panel-sharp-lq101r1sx01.c.

Regards,
Emil

P.S. Please avoid top-posting where possible.

  reply	other threads:[~2016-07-11 14:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20  5:53 [PATCH v2 1/2] drm/dsi: Implement dcs set/get display brightness Vinay Simha BN
2016-06-20  5:53 ` Vinay Simha BN
2016-06-20  5:53 ` [PATCH v7 2/2] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel Vinay Simha BN
2016-06-20  5:53   ` Vinay Simha BN
2016-06-28 15:59   ` Vinay Simha
2016-07-03 22:52     ` Emil Velikov
2016-07-03 22:52       ` Emil Velikov
2016-07-04  6:27       ` Vinay Simha
2016-07-06 17:16         ` Emil Velikov
2016-07-06 17:16           ` Emil Velikov
2016-07-11 12:20       ` Thierry Reding
2016-07-11 12:20         ` Thierry Reding
2016-07-11 12:31         ` Vinay Simha
2016-07-11 14:12           ` Emil Velikov [this message]
2016-06-28 15:59 ` [PATCH v2 1/2] drm/dsi: Implement dcs set/get display brightness Vinay Simha

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='CACvgo52+M0Rv4P5+GPn3p0xqzThcHyBqWFrbiw1hTBbuQ=RKFw@mail.gmail.com' \
    --to=emil.l.velikov@gmail.com \
    --cc=airlied@linux.ie \
    --cc=archit.taneja@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=simhavcs@gmail.com \
    --cc=sumit.semwal@linaro.org \
    --cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.