All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues
@ 2021-04-01 13:07 Weihang Li
  2021-04-01 13:07 ` [PATCH net-next 1/3] net/mlx5: Add a blank line after declarations Weihang Li
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Weihang Li @ 2021-04-01 13:07 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, saeedm, leon, linuxarm, Weihang Li

Just make some cleanups according to the coding style of kernel.

Wenpeng Liang (3):
  net/mlx5: Add a blank line after declarations.
  net/mlx5: Remove return statement exist at the end of void function
  net/mlx5: Replace spaces with tab at the start of a line

 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c    | 2 ++
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c     | 2 +-
 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 1 +
 drivers/net/ethernet/mellanox/mlx5/core/lag.c        | 2 --
 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c    | 1 -
 drivers/net/ethernet/mellanox/mlx5/core/rdma.c       | 1 -
 6 files changed, 4 insertions(+), 5 deletions(-)

-- 
2.8.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next 1/3] net/mlx5: Add a blank line after declarations.
  2021-04-01 13:07 [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Weihang Li
@ 2021-04-01 13:07 ` Weihang Li
  2021-04-01 13:07 ` [PATCH net-next 2/3] net/mlx5: Remove return statement exist at the end of void function Weihang Li
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2021-04-01 13:07 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, saeedm, leon, linuxarm, Wenpeng Liang, Weihang Li

From: Wenpeng Liang <liangwenpeng@huawei.com>

There should be a blank lines after declarations.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c    | 2 ++
 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
index 39475f6..254d4d7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
@@ -358,6 +358,7 @@ static void arfs_may_expire_flow(struct mlx5e_priv *priv)
 	int j;
 
 	HLIST_HEAD(del_list);
+
 	spin_lock_bh(&priv->fs.arfs.arfs_lock);
 	mlx5e_for_each_arfs_rule(arfs_rule, htmp, priv->fs.arfs.arfs_tables, i, j) {
 		if (!work_pending(&arfs_rule->arfs_work) &&
@@ -387,6 +388,7 @@ static void arfs_del_rules(struct mlx5e_priv *priv)
 	int j;
 
 	HLIST_HEAD(del_list);
+
 	spin_lock_bh(&priv->fs.arfs.arfs_lock);
 	mlx5e_for_each_arfs_rule(rule, htmp, priv->fs.arfs.arfs_tables, i, j) {
 		hlist_del_init(&rule->hlist);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
index 22bee49..771114a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
@@ -1085,6 +1085,7 @@ static int fpga_ipsec_fs_create_fte(struct mlx5_flow_root_namespace *ns,
 	rule->ctx = mlx5_fpga_ipsec_fs_create_sa_ctx(dev, fte, is_egress);
 	if (IS_ERR(rule->ctx)) {
 		int err = PTR_ERR(rule->ctx);
+
 		kfree(rule);
 		return err;
 	}
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net-next 2/3] net/mlx5: Remove return statement exist at the end of void function
  2021-04-01 13:07 [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Weihang Li
  2021-04-01 13:07 ` [PATCH net-next 1/3] net/mlx5: Add a blank line after declarations Weihang Li
@ 2021-04-01 13:07 ` Weihang Li
  2021-04-01 13:07 ` [PATCH net-next 3/3] net/mlx5: Replace spaces with tab at the start of a line Weihang Li
  2021-04-07  3:50 ` [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Saeed Mahameed
  3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2021-04-01 13:07 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, saeedm, leon, linuxarm, Wenpeng Liang, Weihang Li

From: Wenpeng Liang <liangwenpeng@huawei.com>

void function return statements are not generally useful.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/lag.c     | 2 --
 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 1 -
 drivers/net/ethernet/mellanox/mlx5/core/rdma.c    | 1 -
 3 files changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag.c
index 127bb92..b874839 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag.c
@@ -603,8 +603,6 @@ void mlx5_lag_add(struct mlx5_core_dev *dev, struct net_device *netdev)
 	if (err)
 		mlx5_core_err(dev, "Failed to init multipath lag err=%d\n",
 			      err);
-
-	return;
 }
 
 /* Must be called with intf_mutex held */
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index a61e09a..53541d3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -94,7 +94,6 @@ static void irq_set_name(char *name, int vecidx)
 
 	snprintf(name, MLX5_MAX_IRQ_NAME, "mlx5_comp%d",
 		 vecidx - MLX5_IRQ_VEC_COMP_BASE);
-	return;
 }
 
 static int request_irqs(struct mlx5_core_dev *dev, int nvec)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
index 8e0dddc..441b545 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
@@ -180,5 +180,4 @@ void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev)
 	mlx5_rdma_del_roce_addr(dev);
 disable_roce:
 	mlx5_nic_vport_disable_roce(dev);
-	return;
 }
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net-next 3/3] net/mlx5: Replace spaces with tab at the start of a line
  2021-04-01 13:07 [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Weihang Li
  2021-04-01 13:07 ` [PATCH net-next 1/3] net/mlx5: Add a blank line after declarations Weihang Li
  2021-04-01 13:07 ` [PATCH net-next 2/3] net/mlx5: Remove return statement exist at the end of void function Weihang Li
@ 2021-04-01 13:07 ` Weihang Li
  2021-04-07  3:50 ` [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Saeed Mahameed
  3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2021-04-01 13:07 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, saeedm, leon, linuxarm, Wenpeng Liang, Weihang Li

From: Wenpeng Liang <liangwenpeng@huawei.com>

There should be no spaces at the start of the line.

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 9ef8e4a..739abfd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -52,7 +52,7 @@
 #include "diag/en_rep_tracepoint.h"
 
 #define MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE \
-        max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
+	max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
 #define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
 
 static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues
  2021-04-01 13:07 [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Weihang Li
                   ` (2 preceding siblings ...)
  2021-04-01 13:07 ` [PATCH net-next 3/3] net/mlx5: Replace spaces with tab at the start of a line Weihang Li
@ 2021-04-07  3:50 ` Saeed Mahameed
  3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2021-04-07  3:50 UTC (permalink / raw)
  To: Weihang Li, davem, kuba; +Cc: netdev, leon, linuxarm

On Thu, 2021-04-01 at 21:07 +0800, Weihang Li wrote:
> Just make some cleanups according to the coding style of kernel.
> 
> Wenpeng Liang (3):
>   net/mlx5: Add a blank line after declarations.
>   net/mlx5: Remove return statement exist at the end of void function
>   net/mlx5: Replace spaces with tab at the start of a line
> 


Applied to net-next-mlx5, Thanks!


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-07  3:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 13:07 [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Weihang Li
2021-04-01 13:07 ` [PATCH net-next 1/3] net/mlx5: Add a blank line after declarations Weihang Li
2021-04-01 13:07 ` [PATCH net-next 2/3] net/mlx5: Remove return statement exist at the end of void function Weihang Li
2021-04-01 13:07 ` [PATCH net-next 3/3] net/mlx5: Replace spaces with tab at the start of a line Weihang Li
2021-04-07  3:50 ` [PATCH net-next 0/3] net/mlx5: Fix some coding-style issues Saeed Mahameed

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.