Skip to content

Commit 4da24fa

Browse files
ecree-solarflaredavem330
authored andcommitted
sfc: cleanups around efx_alloc_channel
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3d6aef6 commit 4da24fa

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

drivers/net/ethernet/sfc/efx_channels.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,7 @@ static void efx_filter_rfs_expire(struct work_struct *data)
505505
#endif
506506

507507
/* Allocate and initialise a channel structure. */
508-
struct efx_channel *
509-
efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel)
508+
static struct efx_channel *efx_alloc_channel(struct efx_nic *efx, int i)
510509
{
511510
struct efx_rx_queue *rx_queue;
512511
struct efx_tx_queue *tx_queue;
@@ -545,7 +544,7 @@ int efx_init_channels(struct efx_nic *efx)
545544
unsigned int i;
546545

547546
for (i = 0; i < EFX_MAX_CHANNELS; i++) {
548-
efx->channel[i] = efx_alloc_channel(efx, i, NULL);
547+
efx->channel[i] = efx_alloc_channel(efx, i);
549548
if (!efx->channel[i])
550549
return -ENOMEM;
551550
efx->msi_context[i].efx = efx;

drivers/net/ethernet/sfc/efx_channels.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ void efx_stop_eventq(struct efx_channel *channel);
3131
void efx_fini_eventq(struct efx_channel *channel);
3232
void efx_remove_eventq(struct efx_channel *channel);
3333

34-
struct efx_channel *
35-
efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel);
3634
int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
3735
void efx_get_channel_name(struct efx_channel *channel, char *buf, size_t len);
3836
void efx_set_channel_names(struct efx_nic *efx);

0 commit comments

Comments
 (0)