lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90b950fc1003301956mf8246f4sd060852dbead1407@mail.gmail.com>
Date:	Wed, 31 Mar 2010 11:56:50 +0900
From:	InKi Dae <daeinki@...il.com>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"kyungmin.park@...sung.com" <kyungmin.park@...sung.com>,
	"linux-fbdev-devel@...ts.sourceforge.net" 
	<linux-fbdev-devel@...ts.sourceforge.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Pavel Machek <pavel@....cz>
Subject: Re: [Linux-fbdev-devel] [PATCH] added S6E63M0 AMOLED LCD Panel 
	driver.

Hi Hertley,

it's a good way.
this way is more clear and also Andrew's concern could be solved.

I'd like to apply it to local repository and then I will send the patch
in the near future.

and Andrew, If you think that Hertley's way is clear then I would make
the patch. maybe it would become second patch.

Thank you.

2010/3/31 H Hartley Sweeten <hartleys@...ionengravers.com>:
> On Tuesday, March 30, 2010 4:03 PM, Andrew Morton wrote:
>> On Fri, 26 Mar 2010 12:24:24 +0900
>> InKi Dae <daeinki@...il.com> wrote:
>>
>>> +static int s6e63m0_ldi_init(struct s6e63m0 *lcd)
>>> +{
>>> +    int ret;
>>> +
>>> +    ret = s6e63m0_panel_send_sequence(lcd, SEQ_PANEL_CONDITION_SET);
>>> +    ret |= s6e63m0_panel_send_sequence(lcd, SEQ_DISPLAY_CONDITION_SET);
>>> +    ret |= s6e63m0_panel_send_sequence(lcd, SEQ_GAMMA_SETTING);
>>> +    ret |= s6e63m0_panel_send_sequence(lcd, SEQ_ETC_CONDITION_SET);
>>> +    ret |= s6e63m0_panel_send_sequence(lcd, SEQ_ACL_ON);
>>> +    ret |= s6e63m0_panel_send_sequence(lcd, SEQ_ELVSS_ON);
>>> +
>>> +    return ret;
>>> +}
>>
>> Well.  If one call to s6e63m0_panel_send_sequence() returns -ENOMEM and
>> another call returns -EIO (for example), this function will return some
>> other, incorrect errno.
>>
>> Which is a rather minor problem, unless some caller is explicitly
>> looking for some particular error code, which doesn't happen often.
>
> Why not handle the calls with a loop?
>
> +static int s6e63m0_ldi_init(struct s6e63m0 *lcd)
> +{
> +       const unsigned short *init_seq[] = {
> +               SEQ_PANEL_CONDITION_SET,
> +               SEQ_DISPLAY_CONDITION_SET,
> +               SEQ_GAMMA_SETTING,
> +               SEQ_ETC_CONDITION_SET,
> +               SEQ_ACL_ON,
> +               SEQ_ELVSS_ON,
> +       };
> +       int i, ret;
> +
> +       for (i = 0; i < ARRAY_SIZE(init_seq); i++) {
> +               ret = s6e63m0_panel_send_sequence(lcd, init_seq[i]);
> +               if (ret)
> +                       break;
> +       }
> +       return ret;
> +}
>
> Note that _s6e63m0_gamma_ctl has the same issue.  Actually, the whole
> driver has issues with returning errors properly.
>
> Regards,
> Hartley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ