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: <4E4CAC63.9030603@cn.fujitsu.com>
Date:	Thu, 18 Aug 2011 14:08:35 +0800
From:	Wanlong Gao <gaowanlong@...fujitsu.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	Li Zefan <lizf@...fujitsu.com>, JJ Ding <jj_ding@....com.tw>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Seth Forshee <seth.forshee@...onical.com>,
	Aaron Huang <aaron_huang@....com.tw>,
	Tom Lin <tom_lin@....com.tw>,
	Eric Piel <E.A.B.Piel@...elft.nl>,
	Daniel Kurtz <djkurtz@...omium.org>,
	Chase Douglas <chase.douglas@...onical.com>,
	Henrik Rydberg <rydberg@...omail.se>,
	Alessandro Rubini <rubini@...l.unipv.it>
Subject: Re: [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


--
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