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, 22 Oct 2022 10:14:21 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Tanjuate Brunostar <tanjubrunostar0@...il.com>
Cc:     linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        outreachy@...ts.linux.dev
Subject: Re: [PATCH v3 4/6] staging: vt6655: refactor long lines of code in
 s_vGenerateTxParameter

On Sat, Oct 22, 2022 at 07:06:10AM +0000, Tanjuate Brunostar wrote:
> fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter
> 
> Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@...il.com>
> ---
>  drivers/staging/vt6655/rxtx.c | 67 ++++++++++++++++++++++++-----------
>  1 file changed, 46 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index dc853b83459b..951d4172e9f2 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice,
>  	}
>  
>  	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
> -		if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> +		if (byFBOption != AUTO_FB_NONE && uDMAIdx !=
> +		    TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {

Don't break lines like this, this is now much harder to read.

It should look like:
		if (byFBOption != AUTO_FB_NONE &&
		    uDMAIdx != TYPE_ATIMDMA &&
		    uDMAIdx != TYPE_BEACONDMA) {

If you want to make it more readable, right?

And that is the main point here, the coding style is to make it readable
to us humans, the compiler doesn't care.

Your change makes the logic harder to understand, not easier, which is a
step backwards.

We write code for developers first (as we have to maintain it), and the
compiler second.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ