public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Mashiro Chen <mashiro.chen@mailbox.org>
To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-hams@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Mashiro Chen <mashiro.chen@mailbox.org>
Subject: [PATCH 5/5] hamradio: mkiss: cleanup indentation and coding style
Date: Sun, 29 Mar 2026 22:34:08 +0800	[thread overview]
Message-ID: <20260329143408.747197-6-mashiro.chen@mailbox.org> (raw)
In-Reply-To: <20260329143408.747197-1-mashiro.chen@mailbox.org>

Clean up the remaining coding style issues in mkiss.c
to follow the Linux Kernel coding standards. The
primary changes include fixing indentation and
alignment issues by using tabs instead of spaces where
possible. Additionally, add missing spaces after
keywords and blank lines after variable declarations.
Block comment formatting is also adjusted to use a
separate line for the trailing delimiter.

Signed-off-by: Mashiro Chen <mashiro.chen@mailbox.org>
---
 drivers/net/hamradio/mkiss.c | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 75b9bd2e1..8939582ac 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -64,7 +64,7 @@ struct mkiss {
 #define AXF_OUTWAIT	4		/* is outpacket was flag	*/
 
 	int		mode;
-        int		crcmode;	/* MW: for FlexNet, SMACK etc.  */
+	int		crcmode;	/* MW: for FlexNet, SMACK etc.  */
 	int		crcauto;	/* CRC auto mode */
 
 #define CRC_MODE_NONE		0
@@ -439,27 +439,30 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
 		/* Configuration Command (kissparms(1).
 		 * Protocol spec says: never append CRC.
 		 * This fixes a very old bug in the linux
-		 * kiss driver. -- dl9sau */
+		 * kiss driver. -- dl9sau
+		 */
 		switch (*p & 0xff) {
 		case 0x85:
 			/* command from userspace especially for us,
-			 * not for delivery to the tnc */
+			 * not for delivery to the tnc
+			 */
 			if (len > 1) {
 				int cmd = (p[1] & 0xff);
-				switch(cmd) {
+
+				switch (cmd) {
 				case 3:
-				  ax->crcmode = CRC_MODE_SMACK;
-				  break;
+					ax->crcmode = CRC_MODE_SMACK;
+					break;
 				case 2:
-				  ax->crcmode = CRC_MODE_FLEX;
-				  break;
+					ax->crcmode = CRC_MODE_FLEX;
+					break;
 				case 1:
-				  ax->crcmode = CRC_MODE_NONE;
-				  break;
+					ax->crcmode = CRC_MODE_NONE;
+					break;
 				case 0:
 				default:
-				  ax->crcmode = CRC_MODE_SMACK_TEST;
-				  cmd = 0;
+					ax->crcmode = CRC_MODE_SMACK_TEST;
+					cmd = 0;
 				}
 				ax->crcauto = (cmd ? 0 : 1);
 				netdev_info(ax->dev, "crc mode set to %d\n", cmd);
@@ -473,6 +476,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
 		}
 	} else {
 		unsigned short crc;
+
 		switch (ax->crcmode) {
 		case CRC_MODE_SMACK_TEST:
 			ax->crcmode  = CRC_MODE_FLEX_TEST;
@@ -812,7 +816,7 @@ static int mkiss_ioctl(struct tty_struct *tty, unsigned int cmd,
 	switch (cmd) {
 	case SIOCGIFNAME:
 		err = copy_to_user((void __user *) arg, ax->dev->name,
-		                   strlen(ax->dev->name) + 1) ? -EFAULT : 0;
+				   strlen(ax->dev->name) + 1) ? -EFAULT : 0;
 		break;
 
 	case SIOCGIFENCAP:
@@ -828,7 +832,7 @@ static int mkiss_ioctl(struct tty_struct *tty, unsigned int cmd,
 		ax->mode = tmp;
 		dev->addr_len        = AX25_ADDR_LEN;
 		dev->hard_header_len = AX25_KISS_HEADER_LEN +
-		                       AX25_MAX_HEADER_LEN + 3;
+				       AX25_MAX_HEADER_LEN + 3;
 		dev->type            = ARPHRD_AX25;
 
 		err = 0;
@@ -838,7 +842,7 @@ static int mkiss_ioctl(struct tty_struct *tty, unsigned int cmd,
 		char addr[AX25_ADDR_LEN];
 
 		if (copy_from_user(&addr,
-		                   (void __user *) arg, AX25_ADDR_LEN)) {
+				   (void __user *)arg, AX25_ADDR_LEN)) {
 			err = -EFAULT;
 			break;
 		}
-- 
2.53.0


  parent reply	other threads:[~2026-03-29 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29 14:34 [PATCH 0/5] hamradio: mkiss: modernize and clean up mkiss driver Mashiro Chen
2026-03-29 14:34 ` [PATCH 1/5] hamradio: mkiss: move assignments out of if conditions Mashiro Chen
2026-03-29 14:34 ` [PATCH 2/5] hamradio: mkiss: remove redundant static initialization to 0 Mashiro Chen
2026-03-29 14:34 ` [PATCH 3/5] hamradio: mkiss: fix spacing around assignment operator Mashiro Chen
2026-03-29 14:34 ` [PATCH 4/5] hamradio: mkiss: modernize logging with netdev and pr macros Mashiro Chen
2026-03-29 14:34 ` Mashiro Chen [this message]
2026-03-29 17:35 ` [PATCH 0/5] hamradio: mkiss: modernize and clean up mkiss driver Jakub Kicinski
2026-03-29 19:19   ` Mashiro Chen

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=20260329143408.747197-6-mashiro.chen@mailbox.org \
    --to=mashiro.chen@mailbox.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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