lkml.org 
[lkml]   [2016]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 2/2] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel
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.

\
 
 \ /
  Last update: 2016-07-11 16:41    [W:0.031 / U:26.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site