* [PATCH net-next 0/4] net: marvell: fix some coding style
@ 2021-03-29 8:01 Weihang Li
2021-03-29 8:01 ` [PATCH net-next 1/4] net: marvell: Delete duplicate word in comments Weihang Li
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Weihang Li @ 2021-03-29 8:01 UTC (permalink / raw)
To: davem, kuba
Cc: sebastian.hesselbarth, thomas.petazzoni, mlindner, stephen,
netdev, linuxarm, Weihang Li
Do some cleanups according to the coding style of kernel.
Yangyang Li (4):
net: marvell: Delete duplicate word in comments
net: marvell: Fix the trailing format of some block comments
net: marvell: Delete extra spaces
net: marvell: Fix an alignment problem
drivers/net/ethernet/marvell/mv643xx_eth.c | 6 ++++--
drivers/net/ethernet/marvell/mvneta.c | 12 ++++++------
drivers/net/ethernet/marvell/skge.c | 9 +++++----
drivers/net/ethernet/marvell/sky2.c | 9 ++++++---
4 files changed, 21 insertions(+), 15 deletions(-)
--
2.8.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 1/4] net: marvell: Delete duplicate word in comments
2021-03-29 8:01 [PATCH net-next 0/4] net: marvell: fix some coding style Weihang Li
@ 2021-03-29 8:01 ` Weihang Li
2021-03-29 8:01 ` [PATCH net-next 2/4] net: marvell: Fix the trailing format of some block comments Weihang Li
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Weihang Li @ 2021-03-29 8:01 UTC (permalink / raw)
To: davem, kuba
Cc: sebastian.hesselbarth, thomas.petazzoni, mlindner, stephen,
netdev, linuxarm, Yangyang Li, Weihang Li
From: Yangyang Li <liyangyang20@huawei.com>
Delete duplicate word in two comments.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/net/ethernet/marvell/mvneta.c | 4 +---
drivers/net/ethernet/marvell/skge.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 563ceac..88545be 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4175,9 +4175,7 @@ static void mvneta_percpu_elect(struct mvneta_port *pp)
rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq);
if (cpu == elected_cpu)
- /* Map the default receive queue queue to the
- * elected CPU
- */
+ /* Map the default receive queue to the elected CPU */
rxq_map |= MVNETA_CPU_RXQ_ACCESS(pp->rxq_def);
/* We update the TX queue map only if we have one
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 8a9c0f4..c0882c7 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -1617,7 +1617,7 @@ static void genesis_mac_init(struct skge_hw *hw, int port)
xm_write16(hw, port, XM_TX_THR, 512);
/*
- * Enable the reception of all error frames. This is is
+ * Enable the reception of all error frames. This is
* a necessary evil due to the design of the XMAC. The
* XMAC's receive FIFO is only 8K in size, however jumbo
* frames can be up to 9000 bytes in length. When bad
--
2.8.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/4] net: marvell: Fix the trailing format of some block comments
2021-03-29 8:01 [PATCH net-next 0/4] net: marvell: fix some coding style Weihang Li
2021-03-29 8:01 ` [PATCH net-next 1/4] net: marvell: Delete duplicate word in comments Weihang Li
@ 2021-03-29 8:01 ` Weihang Li
2021-03-29 8:01 ` [PATCH net-next 3/4] net: marvell: Delete extra spaces Weihang Li
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Weihang Li @ 2021-03-29 8:01 UTC (permalink / raw)
To: davem, kuba
Cc: sebastian.hesselbarth, thomas.petazzoni, mlindner, stephen,
netdev, linuxarm, Yangyang Li, Weihang Li
From: Yangyang Li <liyangyang20@huawei.com>
Use a trailing */ on a separate line for block comments.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/net/ethernet/marvell/mv643xx_eth.c | 6 ++++--
drivers/net/ethernet/marvell/mvneta.c | 6 ++++--
drivers/net/ethernet/marvell/sky2.c | 9 ++++++---
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 90e6111..860b531 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -700,7 +700,8 @@ static int skb_tx_csum(struct mv643xx_eth_private *mp, struct sk_buff *skb,
ip_hdr(skb)->ihl << TX_IHL_SHIFT;
/* TODO: Revisit this. With the usage of GEN_TCP_UDP_CHK_FULL
- * it seems we don't need to pass the initial checksum. */
+ * it seems we don't need to pass the initial checksum.
+ */
switch (ip_hdr(skb)->protocol) {
case IPPROTO_UDP:
cmd |= UDP_FRAME;
@@ -790,7 +791,8 @@ txq_put_hdr_tso(struct sk_buff *skb, struct tx_queue *txq, int length,
WARN(1, "failed to prepare checksum!");
/* Should we set this? Can't use the value from skb_tx_csum()
- * as it's not the correct initial L4 checksum to use. */
+ * as it's not the correct initial L4 checksum to use.
+ */
desc->l4i_chk = 0;
desc->byte_cnt = hdr_len;
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 88545be..3c6f4db 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3993,7 +3993,8 @@ static void mvneta_mac_config(struct phylink_config *config, unsigned int mode,
/* Armada 370 documentation says we can only change the port mode
* and in-band enable when the link is down, so force it down
- * while making these changes. We also do this for GMAC_CTRL2 */
+ * while making these changes. We also do this for GMAC_CTRL2
+ */
if ((new_ctrl0 ^ gmac_ctrl0) & MVNETA_GMAC0_PORT_1000BASE_X ||
(new_ctrl2 ^ gmac_ctrl2) & MVNETA_GMAC2_INBAND_AN_ENABLE ||
(new_an ^ gmac_an) & MVNETA_GMAC_INBAND_AN_ENABLE) {
@@ -4900,7 +4901,8 @@ static int mvneta_ethtool_set_eee(struct net_device *dev,
u32 lpi_ctl0;
/* The Armada 37x documents do not give limits for this other than
- * it being an 8-bit register. */
+ * it being an 8-bit register.
+ */
if (eee->tx_lpi_enabled && eee->tx_lpi_timer > 255)
return -EINVAL;
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index ebe1406..0ce43d7 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -55,7 +55,8 @@
#define RX_DEF_PENDING RX_MAX_PENDING
/* This is the worst case number of transmit list elements for a single skb:
- VLAN:GSO + CKSUM + Data + skb_frags * DMA */
+ * VLAN:GSO + CKSUM + Data + skb_frags * DMA
+ */
#define MAX_SKB_TX_LE (2 + (sizeof(dma_addr_t)/sizeof(u32))*(MAX_SKB_FRAGS+1))
#define TX_MIN_PENDING (MAX_SKB_TX_LE+1)
#define TX_MAX_PENDING 1024
@@ -1529,7 +1530,8 @@ static void sky2_rx_start(struct sky2_port *sky2)
sky2_write32(hw, Q_ADDR(rxq, Q_WM), BMU_WM_PEX);
/* These chips have no ram buffer?
- * MAC Rx RAM Read is controlled by hardware */
+ * MAC Rx RAM Read is controlled by hardware
+ */
if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
hw->chip_rev > CHIP_REV_YU_EC_U_A0)
sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS);
@@ -4684,7 +4686,8 @@ static __exit void sky2_debug_cleanup(void)
#endif
/* Two copies of network device operations to handle special case of
- not allowing netpoll on second port */
+ * not allowing netpoll on second port
+ */
static const struct net_device_ops sky2_netdev_ops[2] = {
{
.ndo_open = sky2_open,
--
2.8.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 3/4] net: marvell: Delete extra spaces
2021-03-29 8:01 [PATCH net-next 0/4] net: marvell: fix some coding style Weihang Li
2021-03-29 8:01 ` [PATCH net-next 1/4] net: marvell: Delete duplicate word in comments Weihang Li
2021-03-29 8:01 ` [PATCH net-next 2/4] net: marvell: Fix the trailing format of some block comments Weihang Li
@ 2021-03-29 8:01 ` Weihang Li
2021-03-29 8:01 ` [PATCH net-next 4/4] net: marvell: Fix an alignment problem Weihang Li
2021-03-29 20:40 ` [PATCH net-next 0/4] net: marvell: fix some coding style patchwork-bot+netdevbpf
4 siblings, 0 replies; 6+ messages in thread
From: Weihang Li @ 2021-03-29 8:01 UTC (permalink / raw)
To: davem, kuba
Cc: sebastian.hesselbarth, thomas.petazzoni, mlindner, stephen,
netdev, linuxarm, Yangyang Li, Weihang Li
From: Yangyang Li <liyangyang20@huawei.com>
Just delete three extra spaces.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/net/ethernet/marvell/mvneta.c | 2 +-
drivers/net/ethernet/marvell/skge.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 3c6f4db..dfa6281 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1084,7 +1084,7 @@ static int mvneta_mbus_io_win_set(struct mvneta_port *pp, u32 base, u32 wsize,
return 0;
}
-static int mvneta_bm_port_mbus_init(struct mvneta_port *pp)
+static int mvneta_bm_port_mbus_init(struct mvneta_port *pp)
{
u32 wsize;
u8 target, attr;
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index c0882c7..69072dd 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -2959,8 +2959,9 @@ static void genesis_set_multicast(struct net_device *dev)
static void yukon_add_filter(u8 filter[8], const u8 *addr)
{
- u32 bit = ether_crc(ETH_ALEN, addr) & 0x3f;
- filter[bit/8] |= 1 << (bit%8);
+ u32 bit = ether_crc(ETH_ALEN, addr) & 0x3f;
+
+ filter[bit / 8] |= 1 << (bit % 8);
}
static void yukon_set_multicast(struct net_device *dev)
--
2.8.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 4/4] net: marvell: Fix an alignment problem
2021-03-29 8:01 [PATCH net-next 0/4] net: marvell: fix some coding style Weihang Li
` (2 preceding siblings ...)
2021-03-29 8:01 ` [PATCH net-next 3/4] net: marvell: Delete extra spaces Weihang Li
@ 2021-03-29 8:01 ` Weihang Li
2021-03-29 20:40 ` [PATCH net-next 0/4] net: marvell: fix some coding style patchwork-bot+netdevbpf
4 siblings, 0 replies; 6+ messages in thread
From: Weihang Li @ 2021-03-29 8:01 UTC (permalink / raw)
To: davem, kuba
Cc: sebastian.hesselbarth, thomas.petazzoni, mlindner, stephen,
netdev, linuxarm, Yangyang Li, Weihang Li
From: Yangyang Li <liyangyang20@huawei.com>
Use tab instead of space to align the code.
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/net/ethernet/marvell/skge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 69072dd..d4bb27b 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -3850,7 +3850,7 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
/* Only used for Genesis XMAC */
if (is_genesis(hw))
- timer_setup(&skge->link_timer, xm_link_timer, 0);
+ timer_setup(&skge->link_timer, xm_link_timer, 0);
else {
dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
NETIF_F_RXCSUM;
--
2.8.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/4] net: marvell: fix some coding style
2021-03-29 8:01 [PATCH net-next 0/4] net: marvell: fix some coding style Weihang Li
` (3 preceding siblings ...)
2021-03-29 8:01 ` [PATCH net-next 4/4] net: marvell: Fix an alignment problem Weihang Li
@ 2021-03-29 20:40 ` patchwork-bot+netdevbpf
4 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-29 20:40 UTC (permalink / raw)
To: Weihang Li
Cc: davem, kuba, sebastian.hesselbarth, thomas.petazzoni, mlindner,
stephen, netdev, linuxarm
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Mon, 29 Mar 2021 16:01:08 +0800 you wrote:
> Do some cleanups according to the coding style of kernel.
>
> Yangyang Li (4):
> net: marvell: Delete duplicate word in comments
> net: marvell: Fix the trailing format of some block comments
> net: marvell: Delete extra spaces
> net: marvell: Fix an alignment problem
>
> [...]
Here is the summary with links:
- [net-next,1/4] net: marvell: Delete duplicate word in comments
https://git.kernel.org/netdev/net-next/c/b52f6425481c
- [net-next,2/4] net: marvell: Fix the trailing format of some block comments
https://git.kernel.org/netdev/net-next/c/df4a17a98d7f
- [net-next,3/4] net: marvell: Delete extra spaces
https://git.kernel.org/netdev/net-next/c/9abcaa96ce6d
- [net-next,4/4] net: marvell: Fix an alignment problem
https://git.kernel.org/netdev/net-next/c/9568387c9f51
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-29 20:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 8:01 [PATCH net-next 0/4] net: marvell: fix some coding style Weihang Li
2021-03-29 8:01 ` [PATCH net-next 1/4] net: marvell: Delete duplicate word in comments Weihang Li
2021-03-29 8:01 ` [PATCH net-next 2/4] net: marvell: Fix the trailing format of some block comments Weihang Li
2021-03-29 8:01 ` [PATCH net-next 3/4] net: marvell: Delete extra spaces Weihang Li
2021-03-29 8:01 ` [PATCH net-next 4/4] net: marvell: Fix an alignment problem Weihang Li
2021-03-29 20:40 ` [PATCH net-next 0/4] net: marvell: fix some coding style patchwork-bot+netdevbpf
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.