lkml.org 
[lkml]   [2011]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 6/6] Input: elantech - add v3 hardware support
    On 08/18/2011 02:02 PM, Dmitry Torokhov wrote:
    > On Thu, Aug 18, 2011 at 12:15:00PM +0800, Wanlong Gao wrote:
    >> On 08/18/2011 11:47 AM, Li Zefan wrote:
    >>>>> +
    >>>>> + case 3:
    >>>>> + if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) ||
    >>>>> + elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) ||
    >>>>> + elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) ||
    >>>>> + elantech_ps2_command(psmouse, NULL, reg) ||
    >>>>> + elantech_ps2_command(psmouse, param, PSMOUSE_CMD_GETINFO)) {
    >>>>> + rc = -1;
    >>>>> + }
    >>>> Prefer to remove these big brace ?
    >>>> also with "case 1, case 2 "?
    >>>
    >>> Just wondering What's wrong with this piece of code and what do you
    >>> sugguest to improve it?
    >>
    >> I think no need to add a '{}' with the *if* ?
    >> and remove the '{}' in whole elantech_read_reg() and
    >> elantech_write_reg(), right?
    >>
    >
    > In case when conditon "overpowers" the body (i.e. multi-line condition)
    > I prefer having braces so the body stands out.
    >
    > Thanks.
    >

    I see, Thanks

    -Wanlong Gao




    \
     
     \ /
      Last update: 2011-08-18 08:11    [W:4.037 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site