All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] sfc: misc cleanups
@ 2020-09-11 18:43 Edward Cree
  2020-09-11 18:44 ` [PATCH net-next 1/3] sfc: remove duplicate call to efx_init_channels from EF100 probe Edward Cree
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Edward Cree @ 2020-09-11 18:43 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Clean up a few nits I noticed while working on TXQ stuff.

Edward Cree (3):
  sfc: remove duplicate call to efx_init_channels from EF100 probe
  sfc: remove spurious unreachable return statement
  sfc: cleanups around efx_alloc_channel

 drivers/net/ethernet/sfc/ef100_nic.c    | 4 ----
 drivers/net/ethernet/sfc/ef100_tx.c     | 1 -
 drivers/net/ethernet/sfc/efx_channels.c | 5 ++---
 drivers/net/ethernet/sfc/efx_channels.h | 2 --
 4 files changed, 2 insertions(+), 10 deletions(-)


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

* [PATCH net-next 1/3] sfc: remove duplicate call to efx_init_channels from EF100 probe
  2020-09-11 18:43 [PATCH net-next 0/3] sfc: misc cleanups Edward Cree
@ 2020-09-11 18:44 ` Edward Cree
  2020-09-11 18:44 ` [PATCH net-next 2/3] sfc: remove spurious unreachable return statement Edward Cree
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Edward Cree @ 2020-09-11 18:44 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

efx_init_struct already calls this, we don't need to do it again.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef100_nic.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c
index fb7752d62ce0..3148fe770356 100644
--- a/drivers/net/ethernet/sfc/ef100_nic.c
+++ b/drivers/net/ethernet/sfc/ef100_nic.c
@@ -1200,10 +1200,6 @@ static int ef100_probe_main(struct efx_nic *efx)
 	if (rc)
 		goto fail;
 
-	rc = efx_init_channels(efx);
-	if (rc)
-		goto fail;
-
 	down_write(&efx->filter_sem);
 	rc = ef100_filter_table_probe(efx);
 	up_write(&efx->filter_sem);


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

* [PATCH net-next 2/3] sfc: remove spurious unreachable return statement
  2020-09-11 18:43 [PATCH net-next 0/3] sfc: misc cleanups Edward Cree
  2020-09-11 18:44 ` [PATCH net-next 1/3] sfc: remove duplicate call to efx_init_channels from EF100 probe Edward Cree
@ 2020-09-11 18:44 ` Edward Cree
  2020-09-11 18:45 ` [PATCH net-next 3/3] sfc: cleanups around efx_alloc_channel Edward Cree
  2020-09-11 21:00 ` [PATCH net-next 0/3] sfc: misc cleanups Jakub Kicinski
  3 siblings, 0 replies; 6+ messages in thread
From: Edward Cree @ 2020-09-11 18:44 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

The statement above it already returns, so there is no way to get here.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef100_tx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/ef100_tx.c b/drivers/net/ethernet/sfc/ef100_tx.c
index 078c7ec2a70e..ef9c2e879499 100644
--- a/drivers/net/ethernet/sfc/ef100_tx.c
+++ b/drivers/net/ethernet/sfc/ef100_tx.c
@@ -27,7 +27,6 @@ int ef100_tx_probe(struct efx_tx_queue *tx_queue)
 				    (tx_queue->ptr_mask + 2) *
 				    sizeof(efx_oword_t),
 				    GFP_KERNEL);
-	return 0;
 }
 
 void ef100_tx_init(struct efx_tx_queue *tx_queue)


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

* [PATCH net-next 3/3] sfc: cleanups around efx_alloc_channel
  2020-09-11 18:43 [PATCH net-next 0/3] sfc: misc cleanups Edward Cree
  2020-09-11 18:44 ` [PATCH net-next 1/3] sfc: remove duplicate call to efx_init_channels from EF100 probe Edward Cree
  2020-09-11 18:44 ` [PATCH net-next 2/3] sfc: remove spurious unreachable return statement Edward Cree
@ 2020-09-11 18:45 ` Edward Cree
  2020-09-11 21:00 ` [PATCH net-next 0/3] sfc: misc cleanups Jakub Kicinski
  3 siblings, 0 replies; 6+ messages in thread
From: Edward Cree @ 2020-09-11 18:45 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

The old_channel argument is never used, so remove it.
The function is only called from elsewhere in efx_channels.c, so make
 it static and remove the declaration from the header file.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/efx_channels.c | 5 ++---
 drivers/net/ethernet/sfc/efx_channels.h | 2 --
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index dd4f30ea48a8..f05ecd415ce6 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -505,8 +505,7 @@ static void efx_filter_rfs_expire(struct work_struct *data)
 #endif
 
 /* Allocate and initialise a channel structure. */
-struct efx_channel *
-efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel)
+static struct efx_channel *efx_alloc_channel(struct efx_nic *efx, int i)
 {
 	struct efx_rx_queue *rx_queue;
 	struct efx_tx_queue *tx_queue;
@@ -545,7 +544,7 @@ int efx_init_channels(struct efx_nic *efx)
 	unsigned int i;
 
 	for (i = 0; i < EFX_MAX_CHANNELS; i++) {
-		efx->channel[i] = efx_alloc_channel(efx, i, NULL);
+		efx->channel[i] = efx_alloc_channel(efx, i);
 		if (!efx->channel[i])
 			return -ENOMEM;
 		efx->msi_context[i].efx = efx;
diff --git a/drivers/net/ethernet/sfc/efx_channels.h b/drivers/net/ethernet/sfc/efx_channels.h
index 2d71dc9a33dd..d77ec1f77fb1 100644
--- a/drivers/net/ethernet/sfc/efx_channels.h
+++ b/drivers/net/ethernet/sfc/efx_channels.h
@@ -31,8 +31,6 @@ void efx_stop_eventq(struct efx_channel *channel);
 void efx_fini_eventq(struct efx_channel *channel);
 void efx_remove_eventq(struct efx_channel *channel);
 
-struct efx_channel *
-efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel);
 int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
 void efx_get_channel_name(struct efx_channel *channel, char *buf, size_t len);
 void efx_set_channel_names(struct efx_nic *efx);

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

* Re: [PATCH net-next 0/3] sfc: misc cleanups
  2020-09-11 18:43 [PATCH net-next 0/3] sfc: misc cleanups Edward Cree
                   ` (2 preceding siblings ...)
  2020-09-11 18:45 ` [PATCH net-next 3/3] sfc: cleanups around efx_alloc_channel Edward Cree
@ 2020-09-11 21:00 ` Jakub Kicinski
  2020-09-11 21:55   ` David Miller
  3 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2020-09-11 21:00 UTC (permalink / raw)
  To: Edward Cree; +Cc: linux-net-drivers, davem, netdev

On Fri, 11 Sep 2020 19:43:26 +0100 Edward Cree wrote:
> Clean up a few nits I noticed while working on TXQ stuff.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>

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

* Re: [PATCH net-next 0/3] sfc: misc cleanups
  2020-09-11 21:00 ` [PATCH net-next 0/3] sfc: misc cleanups Jakub Kicinski
@ 2020-09-11 21:55   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-09-11 21:55 UTC (permalink / raw)
  To: kuba; +Cc: ecree, linux-net-drivers, netdev

From: Jakub Kicinski <kuba@kernel.org>
Date: Fri, 11 Sep 2020 14:00:38 -0700

> On Fri, 11 Sep 2020 19:43:26 +0100 Edward Cree wrote:
>> Clean up a few nits I noticed while working on TXQ stuff.
> 
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>

Series applied.


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

end of thread, other threads:[~2020-09-11 21:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 18:43 [PATCH net-next 0/3] sfc: misc cleanups Edward Cree
2020-09-11 18:44 ` [PATCH net-next 1/3] sfc: remove duplicate call to efx_init_channels from EF100 probe Edward Cree
2020-09-11 18:44 ` [PATCH net-next 2/3] sfc: remove spurious unreachable return statement Edward Cree
2020-09-11 18:45 ` [PATCH net-next 3/3] sfc: cleanups around efx_alloc_channel Edward Cree
2020-09-11 21:00 ` [PATCH net-next 0/3] sfc: misc cleanups Jakub Kicinski
2020-09-11 21:55   ` David Miller

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.