mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Deepak R Varma <drv@mailo.com>
To: outreachy@lists.linux.dev, Larry.Finger@lwfinger.net,
	phil@philpotter.co.uk, paskripkin@gmail.com,
	gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, kumarpraveen@linux.microsoft.com,
	saurabh.truth@gmail.com
Subject: [PATCH v4 02/11] staging: r8188eu: reformat long computation lines
Date: Fri, 21 Oct 2022 02:57:16 +0530	[thread overview]
Message-ID: <e07506ef1dc4ac1d3f8b076a8182628bd0e5cec0.1666299151.git.drv@mailo.com> (raw)
In-Reply-To: <cover.1666299151.git.drv@mailo.com>

Reformat long running computation instructions to improve code readability.
Address checkpatch script complaints like:
	CHECK: line length of 171 exceeds 100 columns

Signed-off-by: Deepak R Varma <drv@mailo.com>
---

Changes in v4:
   -- As the variable name is shorter now, the reformatting is more clearer.

Changes in v3:
   -- None

Changes in v1 [actually v2]:
   1. Further improve the formatting per feedback from gregkh@linuxfoundation.org


 drivers/staging/r8188eu/core/rtw_br_ext.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
index e509b8454e25..d4059f0fc362 100644
--- a/drivers/staging/r8188eu/core/rtw_br_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
@@ -212,7 +212,7 @@ static int __nat25_network_hash(unsigned char *addr)
 		unsigned long x;

 		x = addr[1] ^ addr[2] ^ addr[3] ^ addr[4] ^ addr[5] ^
-			addr[6] ^ addr[7] ^ addr[8] ^ addr[9] ^ addr[10];
+		    addr[6] ^ addr[7] ^ addr[8] ^ addr[9] ^ addr[10];

 		return x & (NAT25_HASH_SIZE - 1);
 	} else if (addr[0] == NAT25_APPLE) {
@@ -224,16 +224,16 @@ static int __nat25_network_hash(unsigned char *addr)
 	} else if (addr[0] == NAT25_PPPOE) {
 		unsigned long x;

-		x = addr[0] ^ addr[1] ^ addr[2] ^ addr[3] ^ addr[4] ^ addr[5] ^ addr[6] ^ addr[7] ^ addr[8];
+		x = addr[0] ^ addr[1] ^ addr[2] ^ addr[3] ^ addr[4] ^
+		    addr[5] ^ addr[6] ^ addr[7] ^ addr[8];

 		return x & (NAT25_HASH_SIZE - 1);
 	} else if (addr[0] == NAT25_IPV6) {
 		unsigned long x;

-		x = addr[1] ^ addr[2] ^ addr[3] ^ addr[4] ^ addr[5] ^
-			addr[6] ^ addr[7] ^ addr[8] ^ addr[9] ^ addr[10] ^
-			addr[11] ^ addr[12] ^ addr[13] ^ addr[14] ^ addr[15] ^
-			addr[16];
+		x = addr[1] ^ addr[2] ^ addr[3] ^ addr[4] ^ addr[5] ^ addr[6] ^
+		    addr[7] ^ addr[8] ^ addr[9] ^ addr[10] ^ addr[11] ^ addr[12] ^
+		    addr[13] ^ addr[14] ^ addr[15] ^ addr[16];

 		return x & (NAT25_HASH_SIZE - 1);
 	} else {
--
2.30.2




  parent reply	other threads:[~2022-10-20 21:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 21:26 [PATCH v4 00/11] staging: r8188eu: trivial code cleanup patches Deepak R Varma
2022-10-20 21:26 ` [PATCH v4 01/11] staging: r8188eu: use Linux kernel variable naming convention Deepak R Varma
2022-10-20 21:27 ` Deepak R Varma [this message]
2022-10-20 21:27 ` [PATCH v4 03/11] staging: r8188eu: remove {} for single statement blocks Deepak R Varma
2022-10-20 21:28 ` [PATCH v4 04/11] staging: r8188eu: use htons macro instead of __constant_htons Deepak R Varma
2022-10-20 21:29 ` [PATCH v4 05/11] staging: r8188eu: correct misspelled words in comments Deepak R Varma
2022-10-20 21:30 ` [PATCH v4 06/11] staging: r8188eu: Add space between function & macro parameters Deepak R Varma
2022-10-20 21:30 ` [PATCH v4 07/11] staging: r8188eu: Associate pointer symbol with parameter name Deepak R Varma
2022-10-20 21:31 ` [PATCH v4 08/11] staging: r8188eu: replace leading spaces by tabs Deepak R Varma
2022-10-21  5:34   ` Praveen Kumar
2022-10-20 23:31     ` Deepak R Varma
2022-10-20 21:31 ` [PATCH v4 09/11] staging: r8188eu: Put '{" on the symbol declaration line Deepak R Varma
2022-10-20 21:32 ` [PATCH v4 10/11] staging: r8188eu: Correct missing or extra space in the statements Deepak R Varma
2022-10-20 21:32 ` [PATCH v4 11/11] staging: r8188eu: Remove unused macros Deepak R Varma
2022-10-21  5:51   ` Praveen Kumar
2022-10-21  5:56     ` Greg KH
2022-10-20 23:34       ` Deepak R Varma
2022-10-21  8:33         ` Greg KH
2022-10-20 23:50           ` Deepak R Varma
2022-10-21  5:20 ` [PATCH v4 00/11] staging: r8188eu: trivial code cleanup patches Philipp Hortmann
2022-10-22  8:05 ` Greg KH
2022-10-21 16:49   ` Deepak R Varma

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=e07506ef1dc4ac1d3f8b076a8182628bd0e5cec0.1666299151.git.drv@mailo.com \
    --to=drv@mailo.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kumarpraveen@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=saurabh.truth@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

all inboxes | Powered by JetHome®