Skip to content

Commit d3e8007

Browse files
Dr. David Alan Gilbertkuba-moo
authored andcommitted
sfc: Remove more unused functions
efx_ticks_to_usecs(), efx_reconfigure_port(), efx_ptp_get_mode(), and efx_tx_get_copy_buffer_limited() are unused. They seem to be partially due to the later splits to Siena, but some seem unused for longer. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Martin Habets <habetsm.xilinx@gmail.com> Link: https://patch.msgid.link/20241102151625.39535-5-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 5254fdf commit d3e8007

File tree

8 files changed

+0
-43
lines changed

8 files changed

+0
-43
lines changed

drivers/net/ethernet/sfc/efx.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,6 @@ unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs)
418418
return usecs * 1000 / efx->timer_quantum_ns;
419419
}
420420

421-
unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks)
422-
{
423-
/* We must round up when converting ticks to microseconds
424-
* because we round down when converting the other way.
425-
*/
426-
return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000);
427-
}
428-
429421
/* Set interrupt moderation parameters */
430422
int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
431423
unsigned int rx_usecs, bool rx_adaptive,

drivers/net/ethernet/sfc/efx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ extern const struct ethtool_ops efx_ethtool_ops;
168168

169169
/* Global */
170170
unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs);
171-
unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks);
172171
int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
173172
unsigned int rx_usecs, bool rx_adaptive,
174173
bool rx_may_override_tx);

drivers/net/ethernet/sfc/efx_common.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -635,22 +635,6 @@ int __efx_reconfigure_port(struct efx_nic *efx)
635635
return rc;
636636
}
637637

638-
/* Reinitialise the MAC to pick up new PHY settings, even if the port is
639-
* disabled.
640-
*/
641-
int efx_reconfigure_port(struct efx_nic *efx)
642-
{
643-
int rc;
644-
645-
EFX_ASSERT_RESET_SERIALISED(efx);
646-
647-
mutex_lock(&efx->mac_lock);
648-
rc = __efx_reconfigure_port(efx);
649-
mutex_unlock(&efx->mac_lock);
650-
651-
return rc;
652-
}
653-
654638
/**************************************************************************
655639
*
656640
* Device reset and suspend

drivers/net/ethernet/sfc/efx_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ void efx_destroy_reset_workqueue(void);
4040
void efx_start_monitor(struct efx_nic *efx);
4141

4242
int __efx_reconfigure_port(struct efx_nic *efx);
43-
int efx_reconfigure_port(struct efx_nic *efx);
4443

4544
#define EFX_ASSERT_RESET_SERIALISED(efx) \
4645
do { \

drivers/net/ethernet/sfc/ptp.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,11 +1800,6 @@ int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
18001800
return NETDEV_TX_OK;
18011801
}
18021802

1803-
int efx_ptp_get_mode(struct efx_nic *efx)
1804-
{
1805-
return efx->ptp_data->mode;
1806-
}
1807-
18081803
int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
18091804
unsigned int new_mode)
18101805
{

drivers/net/ethernet/sfc/ptp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ int efx_ptp_get_ts_config(struct efx_nic *efx,
2626
void efx_ptp_get_ts_info(struct efx_nic *efx,
2727
struct kernel_ethtool_ts_info *ts_info);
2828
bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
29-
int efx_ptp_get_mode(struct efx_nic *efx);
3029
int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
3130
unsigned int new_mode);
3231
int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);

drivers/net/ethernet/sfc/tx.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ static inline u8 *efx_tx_get_copy_buffer(struct efx_tx_queue *tx_queue,
4949
return (u8 *)page_buf->addr + offset;
5050
}
5151

52-
u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue,
53-
struct efx_tx_buffer *buffer, size_t len)
54-
{
55-
if (len > EFX_TX_CB_SIZE)
56-
return NULL;
57-
return efx_tx_get_copy_buffer(tx_queue, buffer);
58-
}
59-
6052
static void efx_tx_maybe_stop_queue(struct efx_tx_queue *txq1)
6153
{
6254
/* We need to consider all queues that the net core sees as one */

drivers/net/ethernet/sfc/tx.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
unsigned int efx_tx_limit_len(struct efx_tx_queue *tx_queue,
1616
dma_addr_t dma_addr, unsigned int len);
1717

18-
u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue,
19-
struct efx_tx_buffer *buffer, size_t len);
20-
2118
/* What TXQ type will satisfy the checksum offloads required for this skb? */
2219
static inline unsigned int efx_tx_csum_type_skb(struct sk_buff *skb)
2320
{

0 commit comments

Comments
 (0)