netlogic: This patch formats existing comments to Linux standards found in TODO.
PATCH 1/1 netlogic: This patch formats existing comments to Linux standards found in TODO.
Netlogic: xlr_net: Fix styling problems with comments
--- drivers/staging/netlogic/xlr_net.c | 67 +++++++++++++++--------------- drivers/staging/netlogic/xlr_net.h | 3 +- 2 files changed, 36 insertions(+), 34 deletions(-)
drivers/staging/netlogic/xlr_net.c +34 -33
@@ -15,20 +15,19 @@#include <linux/jiffies.h> #include <linux/interrupt.h> #include <linux/platform_device.h> -#include <asm/mipsregs.h> -/* + +/** * fmn.h - For FMN credit configuration and registering fmn_handler. * FMN is communication mechanism that allows processing agents within * XLR/XLS to communicate each other. */ #include <asm/netlogic/xlr/fmn.h> -#include "platform_net.h" #include "xlr_net.h" -/* -* The readl/writel implementation byteswaps on XLR/XLS, so +/** +* xlr_nae_wreg() - The readl/writel implementation byteswaps on XLR/XLS, so * we need to use __raw_ IO to read the NAE registers * because they are in the big-endian MMIO area on the SoC. */
@@ -140,8 +139,8 @@ static struct phy_device *xlr_get_phydev(struct xlr_net_priv *priv)return mdiobus_get_phy (priv->mii_bus, priv->phy_addr); } -/* -* Ethtool operation +/** +* xlr_get_link_ksettings() - Ethtool operation */ static int xlr_get_link_ksettings (struct net_device *ndev,struct ethtool_link_ksettings *ecmd)
@@ -173,8 +172,8 @@ static const struct ethtool_ops xlr_ethtool_ops = { .set_link_ksettings = xlr_set_link_ksettings, }; -/* -* Net operations +/** +* xlr_net_fill_rx_ring() - Net operations */ static int xlr_net_fill_rx_ring (struct net_device *ndev) {
@@ -372,10 +371,10 @@ static const struct net_device_ops xlr_netdev_ops = { .ndo_get_stats64 = xlr_stats, }; -/* -* Gmac init +/** +* xlr_config_spill() - Gmac init */ -static void *xlr_config_spill (struct xlr_net_priv *priv,int reg_start_0, +static void xlr_config_spill (struct xlr_net_priv *priv,int reg_start_0,int reg_start_1,int reg_size,int size) {void *spill;
@@ -400,8 +399,8 @@ static void *xlr_config_spill(struct xlr_net_priv *priv, int reg_start_0,return spill; } -/* -* Configure the 6 FIFO's that are used by the network accelarator to +/** +* xlr_config_fifo_spill_area() - Configure the 6 FIFO's that are used by the network accelarator to * communicate with the rest of the XLx device. 4 of the FIFO's are for * packets from NA --> cpu (called Class FIFO's) and 2 are for feeding * the NA with free descriptors.
@@ -440,8 +439,8 @@ static void xlr_config_fifo_spill_area(struct xlr_net_priv *priv) MAX_CLASS_3_SPILL * sizeof(u64)); } -/* -* Configure PDE to Round-Robin distribution of packets to the +/** +* xlr_config_pde() - Configures PDE to Round-Robin distribution of packets to the * available cpu */ static void xlr_config_pde (struct xlr_net_priv *priv)
@@ -470,8 +469,8 @@ static void xlr_config_pde(struct xlr_net_priv *priv) ((bkt_map >> 32) & 0xffffffff)); } -/* -* Setup the Message ring credits, bucket size and other +/** +* xlr_config_common() - Setup the Message ring credits, bucket size and other * common configuration */ static int xlr_config_common (struct xlr_net_priv *priv)
@@ -544,7 +543,7 @@ static void xlr_config_translate_table(struct xlr_net_priv *priv)for (i =0 ; i <64 ; i++) {/* * On use_bkt set the b0, b1 are used, else -* the 4 classes are used, here implemented +* the 4 classes are used, implemented here with * a logic to distribute the packets to the * buckets equally or based on the class */
@@ -575,8 +574,10 @@ static void xlr_config_parser(struct xlr_net_priv *priv)xlr_nae_wreg (priv->base_addr,R_PARSERCONFIGREG , ((0x7f <<8 ) | (1 <<1 ))); -/* configure the parser : L2 Type is configured in the bootloader */ -/* extract IP: src, dest protocol */ +/* +* configure the parser : L2 Type is configured in the bootloader +* extract IP: src, dest protocol +*/ xlr_nae_wreg (priv->base_addr,R_L3CTABLE , (9 <<20 ) | (1 <<19 ) | (1 <<18 ) | (0x01 <<16 ) | (0x0800 <<0 ));
@@ -599,7 +600,7 @@ static int xlr_phy_write(u32 *base_addr, int phy_addr, int regnum, u16 val)unsigned long timeout, stoptime, checktime;int timedout; -/* 100ms timeout*/ + timeout =msecs_to_jiffies (100 ); stoptime = jiffies + timeout; timedout =0 ;
@@ -629,7 +630,7 @@ static int xlr_phy_read(u32 *base_addr, int phy_addr, int regnum)unsigned long timeout, stoptime, checktime;int timedout; -/* 100ms timeout*/ + timeout =msecs_to_jiffies (100 ); stoptime = jiffies + timeout; timedout =0 ;
@@ -683,11 +684,11 @@ static int xlr_mii_read(struct mii_bus *bus, int phy_addr, int regnum)return ret; } -/* -* XLR ports are RGMII. XLS ports are SGMII mostly except the port0, +/** +* xlr_sgmii_init() - XLR ports are RGMII. XLS ports are SGMII mostly except the port0, * which can be configured either SGMII or RGMII, considered SGMII * by default, if board setup to RGMII the port_type need to set -* accordingly.Serdes and PCS layer need to configured for SGMII +* accordingly.Serdes and PCS layer need to be configured for SGMII */ static void xlr_sgmii_init (struct xlr_net_priv *priv) {
@@ -886,8 +887,10 @@ static void xlr_port_enable(struct xlr_net_priv *priv)static void xlr_port_disable (struct xlr_net_priv *priv) { -/* Setup MAC_CONFIG reg */ -/* Rx Tx disable*/ +/* +* Setup MAC_CONFIG reg +* Rx Tx disable +*/ xlr_reg_update(priv->base_addr, R_MAC_CONFIG_1, ((1 << O_MAC_CONFIG_1__rxen) | (1 << O_MAC_CONFIG_1__txen) |
@@ -904,8 +907,8 @@ static void xlr_port_disable(struct xlr_net_priv *priv) 1 << O_RX_CONTROL__RXENABLE, 0); } -/* -* Initialization of gmac +/** +* xlr_gmac_init() - Initialize gmac */ static int xlr_gmac_init (struct xlr_net_priv *priv,struct platform_device *pdev)
@@ -951,9 +954,7 @@ static int xlr_net_probe(struct platform_device *pdev)int err, port;pr_info ("XLR/XLS Ethernet Driver controller %d\n" , pdev->id); -/* -* Allocate our adapter data structure and attach it to the device. -*/ +/* Allocate our adapter data structure and attach it to the device.*/ adapter =devm_kzalloc (&pdev->dev,sizeof (*adapter),GFP_KERNEL );if (!adapter)return -ENOMEM ;
drivers/staging/netlogic/xlr_net.h +2 -1
@@ -971,7 +971,8 @@ MAC_PREPAD + MAC_SKB_BACK_PTR_SIZE + SMP_CACHE_BYTES)#define MAC_CRC_LEN 4#define MAX_NUM_MSGRNG_STN_CC 128 -#define MAX_MSG_SND_ATTEMPTS 100/* 13 stns x 4 entry msg/stn + +#define MAX_MSG_SND_ATTEMPTS 100/* +* 13 stns x 4 entry msg/stn + * headroom */
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 13 lines · Jordan Vaughn
Netlogic:
xlr_net: Fix styling problems with commentsSigned-off-by Jordan Vaughn <[email protected]>--- drivers/staging/netlogic/xlr_net.c | 67 +++++++++++++++--------------- drivers/staging/netlogic/xlr_net.h | 3 +- 2 files changed, 36 insertions(+), 34 deletions(-)drivers/staging/netlogic/xlr_net.c +0
-0
drivers/staging/netlogic/xlr_net.c line 18
Quoted 4 lines
drivers/staging/netlogic/xlr_net.c +0
-1@@ -15,20 +15,19 @@#include <linux/jiffies.h> #include <linux/interrupt.h> #include <linux/platform_device.h> -
This was not a comment change :(
And please write a better changelog.
drivers/staging/netlogic/xlr_net.c line 20
Quoted 4 lines
drivers/staging/netlogic/xlr_net.c +2
-1#include <asm/mipsregs.h> -/* + +/**
That's a kernel-doc format marker, why did you do that?
thanks,
greg k-h
The subject doesn't make sense.
drivers/staging/netlogic/xlr_net.c static void *xlr_config_spill(struct xlr_net_priv *priv, int reg_start_0, · line 403
Quoted 4 lines
drivers/staging/netlogic/xlr_net.c +2
-2-/* -* Configure the 6 FIFO's that are used by the network accelarator to +/** +* xlr_config_fifo_spill_area() - Configure the 6 FIFO's that are used by the network accelarator to
This comment is way too long now. For comments, we want to be within the 80 character limit.
Quoted 4 lines
* communicate with the rest of the XLx device. 4 of the FIFO's are for
* packets from NA --> cpu (called Class FIFO's) and 2 are for feeding
* the NA with free descriptors.(quoted diff) +0
-0@@ -440,8 +439,8 @@ static void xlr_config_fifo_spill_area(struct xlr_net_priv *priv)
[ snip ]
drivers/staging/netlogic/xlr_net.c static int xlr_phy_write(u32 *base_addr, int phy_addr, int regnum, u16 val) · line 604
Quoted 7 lines
drivers/staging/netlogic/xlr_net.c +1
-1@@ -599,7 +600,7 @@ static int xlr_phy_write(u32 *base_addr, int phy_addr, int regnum, u16 val)unsigned long timeout, stoptime, checktime;int timedout; -/* 100ms timeout*/ + timeout =msecs_to_jiffies (100 );
This patch introduces a double blank line checkpatch warning.
drivers/staging/netlogic/xlr_net.c static int xlr_phy_read(u32 *base_addr, int phy_addr, int regnum) · line 634
Quoted 9 lines
drivers/staging/netlogic/xlr_net.c +1
-1stoptime = jiffies + timeout; timedout =0 ;@@ -629,7 +630,7 @@ static int xlr_phy_read(u32 *base_addr, int phy_addr, int regnum)unsigned long timeout, stoptime, checktime;int timedout; -/* 100ms timeout*/ + timeout =msecs_to_jiffies (100 );
Same.
Quoted 2 lines
(quoted diff) +0
-0stoptime = jiffies + timeout; timedout = 0;
[ snip ]
drivers/staging/netlogic/xlr_net.c static int xlr_net_probe(struct platform_device *pdev) · line 957
Quoted 8 lines
drivers/staging/netlogic/xlr_net.c +1
-3@@ -951,9 +954,7 @@ static int xlr_net_probe(struct platform_device *pdev)int err, port;pr_info ("XLR/XLS Ethernet Driver controller %d\n" , pdev->id); -/* -* Allocate our adapter data structure and attach it to the device. -*/ +/* Allocate our adapter data structure and attach it to the device.*/
There needs to be a space before the "*/" closing.
drivers/staging/netlogic/xlr_net.c static int xlr_net_probe(struct platform_device *pdev) · line 960
Quoted 3 lines
drivers/staging/netlogic/xlr_net.c +0
-0adapter =devm_kzalloc (&pdev->dev,sizeof (*adapter),GFP_KERNEL );if (!adapter)return -ENOMEM ;
regards,
dan carpenter
Quoted 1 line · Dan Carpenter
The subject doesn't make sense.
That subject does make sense, it's just that my email client wrapped it so that I didn't see the last few words. It needs to be shorter.
regards,
dan carpenter