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]
Date:	Sat, 17 May 2014 22:14:52 +0100
From:	Masaru Nomura <massa.nomura@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Lidza Louina <lidza.louina@...il.com>, markh@...pro.net,
	devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
	driverdev-devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] staging: dgnc: dgnc_neo: Fix conditional part of if statement

Hi Dan,

Thank you for your detailed explanation!

> This isn't the right way.  Write it like this:
>
>         if ((ch->ch_digi.digi_flags & CTSPACE) ||
>             (ch->ch_digi.digi_flags & RTSPACE) ||
>             (ch->ch_c_cflag & CRTSCTS) ||
>             !(ch->ch_digi.digi_flags & DIGI_FORCEDCD) ||
>             !(ch->ch_c_cflag & CLOCAL)) {
>                 ier |= UART_IER_MSI;
>         else
>                 ier &= ~UART_IER_MSI;
>
> 1) The "||" operation goes at the end of the line.
> 2) The conditions are all in a line.  The indenting is
>
> [tab][space][space][space][space](ch->ch_digi.digi_f...

Sure, I'll modify this.

> Also just fold this patch and [patch 2/4] together into one patch.  We
> don't need two patches to fix one if statement.
>
> The one thing per patch rule is a bit tricky.  It means that you have to
> say which one thing you are fixing.  Don't say "I am fixing three
> things."  Say "I am fixing one if statement".

So in this case, do you think I could fold all four patches into one?
As I just worked on the 'same' if statements and divided them into
four patches, this could be the case. (but I'm not sure yet...)

Also, should I put v[number] for the modified patches?
Say [PATCH v2] staging: ...

Thank you,
Masaru
--
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