public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: valdis.kletnieks@vt.edu
To: Hyunil Kim <thtlwlsmsgkfla@gmail.com>
Cc: gregkh@linuxfoundation.org, davem@davemloft.net,
	colin.king@canonical.com, johannes.berg@intel.com,
	Linyu.Yuan@alcatel-sbell.com.cn, keescook@chromium.org,
	tvboxspy@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: fix line over 80 characters
Date: Sat, 16 Jun 2018 19:22:07 +0000	[thread overview]
Message-ID: <127735.1529176927@turing-police.cc.vt.edu> (raw)
In-Reply-To: <1909265.MoDodiKBI3@os-virtualbox>

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

On Sat, 16 Jun 2018 15:00:31 +0900, Hyunil Kim said:
> *fix checkpatch.pl warnings:
>  WARNING: line over 80 characters

> +		if (((ieee->wpa_ie[0] == 0xdd) &&
> +		    (!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4))) ||
> +		    ((ieee->wpa_ie[0] == 0x30) &&
> +		    (!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))

Ouch. The && and || at ends of line mean a lot of parenthesis counting to
figure out which goes with which.  Use additional indentation to help
understanding.

+		if (((ieee->wpa_ie[0] == 0xdd) &&
+			(!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4))) ||
+		    ((ieee->wpa_ie[0] == 0x30) &&
+			(!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))

Or perhaps

+		if (((ieee->wpa_ie[0] == 0xdd) &&
+			(!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4)))
+		     || ((ieee->wpa_ie[0] == 0x30) &&
+			(!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))




[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]

  parent reply	other threads:[~2018-06-16 19:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16  6:00 [PATCH] staging: rtl8192u: fix line over 80 characters Hyunil Kim
2018-06-16  6:03 ` Julia Lawall
2018-06-16 13:25 ` Walter Harms
2018-06-16 19:22 ` valdis.kletnieks [this message]
2018-06-16 23:13   ` [PATCH] " Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=127735.1529176927@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=Linyu.Yuan@alcatel-sbell.com.cn \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes.berg@intel.com \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thtlwlsmsgkfla@gmail.com \
    --cc=tvboxspy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox