Skip to contentSkip to conversation

Ensure that comments adhere to coding standard

PATCH In review [email protected] 3 participants 3 messages Apr 3, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ensure that comments adhere to coding standard

From: Mohammed Billoo <[email protected]>

Files in wilc1000 were modified to ensure that comments adhere to standard specified by Documentation/CodingStyle

---
 drivers/staging/wilc1000/host_interface.c     |   6 +-
 drivers/staging/wilc1000/linux_mon.c          |  19 ++-
 drivers/staging/wilc1000/wilc_debugfs.c       |  12 +-
 drivers/staging/wilc1000/wilc_sdio.c          | 145 +++++------------
 drivers/staging/wilc1000/wilc_spi.c           | 220 +++++++++-----------------
 drivers/staging/wilc1000/wilc_wfi_netdevice.h |   4 +-
 drivers/staging/wilc1000/wilc_wlan.h          |  89 ++++-------
 drivers/staging/wilc1000/wilc_wlan_cfg.c      |  46 ++----
 drivers/staging/wilc1000/wilc_wlan_cfg.h      |  13 +-
 drivers/staging/wilc1000/wilc_wlan_if.h       |  44 ++----
 10 files changed, 194 insertions(+), 404 deletions(-)
drivers/staging/wilc1000/host_interface.c +4 -2
index 0a922c7..b40dce2 100644
@@ -263,7 +263,8 @@ static struct wilc_vif *join_req_vif;
 static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo);
 static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
 
-/* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
+/*
+ * The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
  * special purpose in wilc device, so we add 1 to the index to starts from 1.
  * As a result, the returned index will be 1 to NUM_CONCURRENT_IFC.
  */
@@ -272,7 +273,8 @@ int wilc_get_vif_idx(struct wilc_vif *vif)
 	return vif->idx + 1;
 }
 
-/* We need to minus 1 from idx which is from wilc device to get real index
+/*
+ * We need to minus 1 from idx which is from wilc device to get real index
  * of wilc->vif[], because we add 1 when pass to wilc device in the function
  * wilc_get_vif_idx.
  * As a result, the index should be between 0 and NUM_CONCURRENT_IFC -1.
drivers/staging/wilc1000/linux_mon.c +13 -6
index 7d9e5de..d8d4be6 100644
@@ -60,8 +60,10 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
 	/* Get WILC header */
 	memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET);
 
-	/* The packet offset field conain info about what type of managment frame */
-	/* we are dealing with and ack status */
+	/*
+	 * The packet offset field conain info about what type of managment
+	 * frame we are dealing with and ack status
+	 */
 	pkt_offset = GET_PKT_OFFSET(header);
 
 	if (pkt_offset & IS_MANAGMEMENT_CALLBACK) {
@@ -128,7 +130,10 @@ static void mgmt_tx_complete(void *priv, int status)
 {
 	struct tx_complete_mon_data *pv_data = priv;
 
-	/* incase of fully hosting mode, the freeing will be done in response to the cfg packet */
+	/*
+	 * In case of fully hosting mode, the freeing will be done in response
+	 * to the cfg packet
+	 */
 	kfree(pv_data->buff);
 
 	kfree(pv_data);
@@ -227,8 +232,10 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 	/* Identify if Ethernet or MAC header (data or mgmt) */
 	memcpy(srcAdd, &skb->data[10], 6);
 	memcpy(bssid, &skb->data[16], 6);
-	/* if source address and bssid fields are equal>>Mac header */
-	/*send it to mgmt frames handler */
+	/*
+	 * If source address and bssid fields are equal>>Mac header
+	 * send it to mgmt frames handler
+	 */
 	if (!(memcmp(srcAdd, bssid, 6))) {
 		ret = mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
 		if (ret)
@@ -260,7 +267,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 	u32 ret = 0;
 	struct WILC_WFI_mon_priv *priv;
 
-	/*If monitor interface is already initialized, return it*/
+	/* If monitor interface is already initialized, return it*/
 	if (wilc_wfi_mon)
 		return wilc_wfi_mon;
 
drivers/staging/wilc1000/wilc_debugfs.c +1 -11
index fcbc95d..4fb819d 100644
@@ -6,7 +6,6 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
  */
 
 #if defined(WILC_DEBUGFS)
@@ -20,9 +19,7 @@
 
 static struct dentry *wilc_dir;
 
-/*
- * --------------------------------------------------------------------------------
- */
+
 #define DEBUG           BIT(0)
 #define INFO            BIT(1)
 #define WRN             BIT(2)
@@ -32,10 +29,6 @@ static struct dentry *wilc_dir;
 atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
 EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL);
 
-/*
- * --------------------------------------------------------------------------------
- */
-
 
 static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, size_t count, loff_t *ppos)
 {
@@ -76,9 +69,6 @@ static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
 	return count;
 }
 
-/*
- * --------------------------------------------------------------------------------
- */
 
 #define FOPS(_open, _read, _write, _poll) { \
 		.owner	= THIS_MODULE, \
drivers/staging/wilc1000/wilc_sdio.c +43 -102

331 lines not on this page · raw message

drivers/staging/wilc1000/wilc_spi.c +72 -148

505 lines not on this page · raw message

drivers/staging/wilc1000/wilc_wfi_netdevice.h +1 -3
index 4123cff..3d89167 100644
@@ -86,7 +86,7 @@ struct sta_info {
 	u8 au8Sta_AssociatedBss[MAX_NUM_STA][ETH_ALEN];
 };
 
-/*Parameters needed for host interface for  remaining on channel*/
+/* Parameters needed for host interface for  remaining on channel */
 struct wilc_wfi_p2pListenParams {
 	struct ieee80211_channel *pstrListenChan;
 	enum nl80211_channel_type tenuChannelType;
@@ -129,10 +129,8 @@ struct wilc_priv {
 	struct wilc_wfi_key *wilc_gtk[MAX_NUM_STA];
 	struct wilc_wfi_key *wilc_ptk[MAX_NUM_STA];
 	u8 wilc_groupkey;
-	/* semaphores */
 	struct semaphore SemHandleUpdateStats;
 	struct semaphore hSemScanReq;
-	/*  */
 	bool gbAutoRateAdjusted;
 
 	bool bInP2PlistenState;
drivers/staging/wilc1000/wilc_wlan.h +31 -58

134 lines not on this page · raw message

drivers/staging/wilc1000/wilc_wlan_cfg.c +14 -32

82 lines not on this page · raw message

drivers/staging/wilc1000/wilc_wlan_cfg.h +5 -8
index b8641a2..79644c4 100644
@@ -1,11 +1,8 @@
-/* ////////////////////////////////////////////////////////////////////////// */
-/*  */
-/* Copyright (c) Atmel Corporation.  All rights reserved. */
-/*  */
-/* Module Name:  wilc_wlan_cfg.h */
-/*  */
-/*  */
-/* ///////////////////////////////////////////////////////////////////////// */
+/*
+/* Copyright (c) Atmel Corporation.  All rights reserved.
+ *
+ * Module Name:  wilc_wlan_cfg.h
+ */
 
 #ifndef WILC_WLAN_CFG_H
 #define WILC_WLAN_CFG_H
drivers/staging/wilc1000/wilc_wlan_if.h +10 -34

80 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 6 lines · On Sun, Apr 03, 2016 at 02:18:46PM -0400, [email protected] wrote:

From: Mohammed Billoo <[email protected]>

Files in wilc1000 were modified to ensure that comments adhere to standard specified by Documentation/CodingStyle

Please put the subsystem and driver in your subject: as we have no idea what this is referring to otherwise. Look at the other patches that have been accepted for this driver to see examples of how to do that by running:
git log drivers/staging/wilc1000

Also, note that this is a network driver, so the comments here are already in the correct format, so I don't think this patch is needed at all, do you?

thanks,

greg k-h

#2 lore raw
In reply to [email protected]
reproduce:

Hi Mohammed,

[auto build test WARNING on v4.6-rc2]
[cannot apply to staging/staging-testing next-20160401]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/mohammed-billoo-gmail-com/Ensure-that-comments-adhere-to-coding-standard/20160404-022342
config: x86_64-randconfig-x010-201614 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

In file included from drivers/staging/wilc1000/wilc_wlan_cfg.c:10:0:

>> drivers/staging/wilc1000/wilc_wlan_cfg.h:2:1: warning: "/*" within comment [-Wcomment]
    /* Copyright (c) Atmel Corporation.  All rights reserved.
    ^

vim +2 drivers/staging/wilc1000/wilc_wlan_cfg.h

     1	/*
   > 2	/* Copyright (c) Atmel Corporation.  All rights reserved.
     3	 *
     4	 * Module Name:  wilc_wlan_cfg.h
     5	 */
     6	
     7	#ifndef WILC_WLAN_CFG_H
     8	#define WILC_WLAN_CFG_H
     9	
    10	struct wilc_cfg_byte {

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation