All of lore.kernel.org
 help / color / mirror / Atom feed
From: suniel.spartan@gmail.com
To: gregkh@linuxfoundation.org, dan.carpenter@oracle.com
Cc: linux-kernel@vger.kernel.org, sunil.m@techveda.org,
	devel@driverdev.osuosl.org,
	Suniel Mahesh <suniel.spartan@gmail.com>
Subject: [PATCH v5 1/6] staging: rtl8192e: Fix comments as per kernel coding style
Date: Tue, 21 Mar 2017 14:31:00 +0530	[thread overview]
Message-ID: <1490086865-4424-2-git-send-email-suniel.spartan@gmail.com> (raw)
In-Reply-To: <1490086865-4424-1-git-send-email-suniel.spartan@gmail.com>

From: Suniel Mahesh <suniel.spartan@gmail.com>

Fixed the following checkpatch.pl warnings:
Block comments should align the * on each line
Block comments use * on subsequent lines

Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
---
Changes for v5:

- Changed email address from sunil.m@techveda.org to suniel.spartan@gmail.com,
  reason being few patches were being dropped and not getting delivered,
  couldn't resolve that issue
- Resending the whole series as requested by Greg K-H
- Patches were tested and built on next-20170310 and staging-testing

Changes for v4:

- Dropped two patches from the series, as they were not adding significant value
  suggested by Dan Carpenter.
  staging: rtl8192e: Fix coding style, this was fixing line over 80 characters.
  staging: rtl8192e: Fix unbalanced braces
- Resending the whole series as requested by Greg K-H
- Patches were tested and built on next-20170310 and staging-testing

Changes for v3:

- Split earlier patches into multiple commits for easy review
  as suggested by Greg K-H
- Modified subject and description for better readability
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
  as suggested by Greg K-H, no errors reported

Changes for v2:

- Split larger patch into multiple commits as suggested
  by Dan Carpenter
- This patch fixes coding style issues, comments in rtl_core.c
  reported by checkpatch.pl
- Modified short description to 'Fix coding style issues' from
  'Fix coding style issues, improve error handling'
- Improve error handling is taken care by the following patch
  in the series
- Removed statements, 'Return -ENOMEM, if it is out of memory',
  'Pointer comparison with NULL replaced by logical NOT' from the
  body of the patch
- Rebased on top of next-20170306
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 61 ++++++++++------------------
 1 file changed, 22 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 4c0caa6..a648064 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1,4 +1,4 @@
-/******************************************************************************
+/*
  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
  *
  * Based on the r8180 driver, which is:
@@ -17,7 +17,7 @@
  *
  * Contact Information:
  * wlanfae <wlanfae@realtek.com>
-******************************************************************************/
+ */
 #include <linux/uaccess.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
@@ -75,12 +75,12 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
 static irqreturn_t _rtl92e_irq(int irq, void *netdev);
 
 static struct pci_driver rtl8192_pci_driver = {
-	.name = DRV_NAME,	/* Driver name   */
-	.id_table = rtl8192_pci_id_tbl,	/* PCI_ID table  */
-	.probe	= _rtl92e_pci_probe,	/* probe fn      */
-	.remove	 = _rtl92e_pci_disconnect,	/* remove fn */
-	.suspend = rtl92e_suspend,	/* PM suspend fn */
-	.resume = rtl92e_resume,                 /* PM resume fn  */
+	.name = DRV_NAME,
+	.id_table = rtl8192_pci_id_tbl,
+	.probe	= _rtl92e_pci_probe,
+	.remove	 = _rtl92e_pci_disconnect,
+	.suspend = rtl92e_suspend,
+	.resume = rtl92e_resume,
 };
 
 static short _rtl92e_is_tx_queue_empty(struct net_device *dev);
@@ -100,10 +100,7 @@ static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
 static int _rtl92e_down(struct net_device *dev, bool shutdownrf);
 static void _rtl92e_restart(void *data);
 
-/****************************************************************************
-   -----------------------------IO STUFF-------------------------
-*****************************************************************************/
-
+/* IO STUFF */
 u8 rtl92e_readb(struct net_device *dev, int x)
 {
 	return 0xff & readb((u8 __iomem *)dev->mem_start + x);
@@ -140,9 +137,7 @@ void rtl92e_writew(struct net_device *dev, int x, u16 y)
 	udelay(20);
 }
 
-/****************************************************************************
-   -----------------------------GENERAL FUNCTION-------------------------
-*****************************************************************************/
+/* GENERAL FUNCTION */
 bool rtl92e_set_rf_state(struct net_device *dev,
 			 enum rt_rf_power_state StateToSet,
 			 RT_RF_CHANGE_SOURCE ChangeSource)
@@ -978,7 +973,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
 	if (!priv->pFirmware)
 		netdev_err(dev,
 			   "rtl8192e: Unable to allocate space for firmware\n");
-
 	skb_queue_head_init(&priv->skb_queue);
 
 	for (i = 0; i < MAX_QUEUE_SIZE; i++)
@@ -1101,9 +1095,7 @@ static short _rtl92e_init(struct net_device *dev)
 	return 0;
 }
 
-/***************************************************************************
-	-------------------------------WATCHDOG STUFF---------------------------
-***************************************************************************/
+/* WATCHDOG STUFF */
 static short _rtl92e_is_tx_queue_empty(struct net_device *dev)
 {
 	int i = 0;
@@ -1540,9 +1532,7 @@ static void _rtl92e_watchdog_timer_cb(unsigned long data)
 		  msecs_to_jiffies(RTLLIB_WATCH_DOG_TIME));
 }
 
-/****************************************************************************
- ---------------------------- NIC TX/RX STUFF---------------------------
-*****************************************************************************/
+/* NIC TX/RX STUFF */
 void rtl92e_rx_enable(struct net_device *dev)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
@@ -1982,6 +1972,7 @@ void rtl92e_update_rx_statistics(struct r8192_priv *priv,
 					weighting) / 6;
 }
 
+/* QueryRxPwrPercentage */
 u8 rtl92e_rx_db_to_percent(s8 antpower)
 {
 	if ((antpower <= -100) || (antpower >= 20))
@@ -1991,7 +1982,7 @@ u8 rtl92e_rx_db_to_percent(s8 antpower)
 	else
 		return	100 + antpower;
 
-}	/* QueryRxPwrPercentage */
+}
 
 u8 rtl92e_evm_db_to_percent(s8 value)
 {
@@ -2052,9 +2043,9 @@ static void _rtl92e_rx_normal(struct net_device *dev)
 		pdesc, skb))
 			goto done;
 		new_skb = dev_alloc_skb(priv->rxbuffersize);
-		/* if allocation of new skb failed - drop current packet
-		 * and reuse skb
-		 */
+/* if allocation of new skb failed - drop current packet
+ * and reuse skb
+ */
 		if (unlikely(!new_skb))
 			goto done;
 
@@ -2066,7 +2057,7 @@ static void _rtl92e_rx_normal(struct net_device *dev)
 		skb_put(skb, pdesc->Length);
 		skb_reserve(skb, stats.RxDrvInfoSize +
 			stats.RxBufShift);
-		skb_trim(skb, skb->len - 4/*sCrcLng*/);
+		skb_trim(skb, skb->len - 4/* sCrcLng */);
 		rtllib_hdr = (struct rtllib_hdr_1addr *)skb->data;
 		if (!is_multicast_ether_addr(rtllib_hdr->addr1)) {
 			/* unicast packet */
@@ -2155,9 +2146,7 @@ static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv)
 		      rtl92e_readl(priv->rtllib->dev, INTA_MASK) | IMR_RDU);
 }
 
-/****************************************************************************
- ---------------------------- NIC START/CLOSE STUFF---------------------------
-*****************************************************************************/
+/* NIC START/CLOSE STUFF */
 static void _rtl92e_cancel_deferred_work(struct r8192_priv *priv)
 {
 	cancel_delayed_work_sync(&priv->watch_dog_wq);
@@ -2532,11 +2521,7 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
 	return IRQ_HANDLED;
 }
 
-
-
-/****************************************************************************
-	---------------------------- PCI_STUFF---------------------------
-*****************************************************************************/
+/* PCI_STUFF */
 static const struct net_device_ops rtl8192_netdev_ops = {
 	.ndo_open = _rtl92e_open,
 	.ndo_stop = _rtl92e_close,
@@ -2620,7 +2605,7 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
 	dev->mem_end = ioaddr + pci_resource_len(pdev, 0);
 
 	pci_read_config_byte(pdev, 0x08, &revision_id);
-	/* If the revisionid is 0x10, the device uses rtl8192se. */
+	/* If the revisionid is 0x10, the device uses rtl8192se */
 	if (pdev->device == 0x8192 && revision_id == 0x10)
 		goto err_unmap;
 
@@ -2784,9 +2769,7 @@ void rtl92e_check_rfctrl_gpio_timer(unsigned long data)
 		  msecs_to_jiffies(RTLLIB_WATCH_DOG_TIME));
 }
 
-/***************************************************************************
-	------------------- module init / exit stubs ----------------
-****************************************************************************/
+/* module init / exit stubs */
 MODULE_DESCRIPTION("Linux driver for Realtek RTL819x WiFi cards");
 MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR);
 MODULE_VERSION(DRV_VERSION);
-- 
1.9.1

  reply	other threads:[~2017-03-21  9:01 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07  7:09 [PATCH] staging: rtl8192e: fix coding style issue, improve error handling Suniel Mahesh
2017-03-07 17:12 ` Dan Carpenter
2017-03-09 18:50   ` [PATCH v2 0/5] staging: rtl8192e: Fix coding style, warnings and checks sunil.m
2017-03-09 18:50     ` [PATCH v2 1/5] staging: rtl8192e: Fix coding style issues sunil.m
2017-03-11  8:11       ` kbuild test robot
2017-03-12 13:41       ` Greg KH
2017-03-15  9:51         ` [PATCH v3 0/8] staging: rtl8192e: Fix coding style, warnings and checks sunil.m
2017-03-15  9:51           ` [PATCH v3 1/8] staging: rtl8192e: Fix comments as per kernel coding style sunil.m
2017-03-15  9:51           ` [PATCH v3 2/8] staging: rtl8192e: Fix " sunil.m
2017-03-15 10:14             ` Dan Carpenter
2017-03-15 11:09               ` Suniel Mahesh
2017-03-15 11:15                 ` Dan Carpenter
2017-03-15 10:15             ` Dan Carpenter
2017-03-15  9:51           ` [PATCH v3 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message sunil.m
2017-03-15 10:16             ` Dan Carpenter
2017-03-15 10:58               ` [PATCH v4 " sunil.m
2017-03-16  2:36                 ` Greg KH
2017-03-16 22:12                   ` [PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks sunil.m
2017-03-16 22:12                     ` [PATCH v4 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m
2017-03-16 22:12                     ` [PATCH v4 6/6] staging: rtl8192e: Fix blank lines and space after a cast sunil.m
2017-03-17  6:16                     ` [PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks Greg KH
2017-03-21  9:00                       ` [PATCH v5 " suniel.spartan
2017-03-21  9:01                         ` suniel.spartan [this message]
2017-03-21  9:01                         ` [PATCH v5 2/6] staging: rtl8192e: Remove unnecessary 'out of memory' message suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 3/6] staging: rtl8192e: Rectify pointer comparisions with NULL suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 5/6] staging: rtl8192e: Fix issues reported by checkpatch.pl suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 6/6] staging: rtl8192e: Fix blank lines and space after a cast suniel.spartan
2017-03-15  9:51           ` [PATCH v3 4/8] staging: rtl8192e: Rectify pointer comparisions with NULL sunil.m
2017-03-15  9:51           ` [PATCH v3 5/8] staging: rtl8192e: Fix unbalanced braces sunil.m
2017-03-15 10:24             ` Dan Carpenter
2017-03-15  9:51           ` [PATCH v3 6/8] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m
2017-03-15  9:51           ` [PATCH v3 7/8] staging: rtl8192e: Fix issues reported by checkpatch.pl sunil.m
2017-03-15  9:51           ` [PATCH v3 8/8] staging: rtl8192e: Fix blank lines and space after a cast sunil.m
2017-03-09 18:50     ` [PATCH v2 2/5] staging: rtl8192e: Improve error handling sunil.m
2017-03-09 18:50     ` [PATCH v2 3/5] staging: rtl8192e: Rectify pointer comparisions sunil.m
2017-03-09 18:50     ` [PATCH v2 4/5] staging: rtl8192e: Fix unbalanced braces around else statement sunil.m
2017-03-09 18:50     ` [PATCH v2 5/5] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m
2017-03-17  9:58       ` Suniel Mahesh
2017-03-09 18:50 ` [PATCH] staging: rtl8192e: fix coding style issue, improve error handling kbuild test robot
     [not found] <20170318060652.GA19602@kroah.com>
2017-03-18  7:38 ` [PATCH v5 0/6] staging: rtl8192e: Fix coding style, warnings and checks suniel.spartan
2017-03-18  7:38   ` [PATCH v5 1/6] staging: rtl8192e: Fix comments as per kernel coding style suniel.spartan

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=1490086865-4424-2-git-send-email-suniel.spartan@gmail.com \
    --to=suniel.spartan@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sunil.m@techveda.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.