]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: sfc: use ethtool string helpers
authorRosen Penev <rosenp@gmail.com>
Tue, 5 Nov 2024 23:18:55 +0000 (15:18 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 9 Nov 2024 17:10:37 +0000 (09:10 -0800)
The latter is the preferred way to copy ethtool strings.

Avoids manually incrementing the pointer. Cleans up the code quite well.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://patch.msgid.link/20241105231855.235894-1-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
20 files changed:
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/ef100_nic.c
drivers/net/ethernet/sfc/ethtool_common.c
drivers/net/ethernet/sfc/falcon/ethtool.c
drivers/net/ethernet/sfc/falcon/falcon.c
drivers/net/ethernet/sfc/falcon/net_driver.h
drivers/net/ethernet/sfc/falcon/nic.c
drivers/net/ethernet/sfc/falcon/nic.h
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/nic.c
drivers/net/ethernet/sfc/nic_common.h
drivers/net/ethernet/sfc/ptp.c
drivers/net/ethernet/sfc/ptp.h
drivers/net/ethernet/sfc/siena/ethtool_common.c
drivers/net/ethernet/sfc/siena/net_driver.h
drivers/net/ethernet/sfc/siena/nic.c
drivers/net/ethernet/sfc/siena/nic_common.h
drivers/net/ethernet/sfc/siena/ptp.c
drivers/net/ethernet/sfc/siena/ptp.h
drivers/net/ethernet/sfc/siena/siena.c

index de131fc5fa0bbc7ed87aba720f2c6408e87e3296..452009ed7a435616b8b625629eaddb6f51f2eb1f 100644 (file)
@@ -1751,7 +1751,7 @@ static void efx_ef10_get_stat_mask(struct efx_nic *efx, unsigned long *mask)
 #endif
 }
 
-static size_t efx_ef10_describe_stats(struct efx_nic *efx, u8 *names)
+static size_t efx_ef10_describe_stats(struct efx_nic *efx, u8 **names)
 {
        DECLARE_BITMAP(mask, EF10_STAT_COUNT);
 
index 6da06931187d68bcca0319fdd1c9d1f4b68eff2b..62e674d6ff60c71b239d7c1a49422ba1d39c3dc3 100644 (file)
@@ -583,7 +583,7 @@ static const struct efx_hw_stat_desc ef100_stat_desc[EF100_STAT_COUNT] = {
        EFX_GENERIC_SW_STAT(rx_noskb_drops),
 };
 
-static size_t ef100_describe_stats(struct efx_nic *efx, u8 *names)
+static size_t ef100_describe_stats(struct efx_nic *efx, u8 **names)
 {
        DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
 
index ae32e08540fa19fad822b5f1e2d1e70a77d4a49a..2d734496733fad04d38aa9b467c9393cc3878c3d 100644 (file)
@@ -395,7 +395,7 @@ int efx_ethtool_fill_self_tests(struct efx_nic *efx,
        return n;
 }
 
-static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
+static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 **strings)
 {
        size_t n_stats = 0;
        struct efx_channel *channel;
@@ -403,24 +403,22 @@ static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
        efx_for_each_channel(channel, efx) {
                if (efx_channel_has_tx_queues(channel)) {
                        n_stats++;
-                       if (strings != NULL) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "tx-%u.tx_packets",
-                                        channel->tx_queue[0].queue /
-                                        EFX_MAX_TXQ_PER_CHANNEL);
+                       if (!strings)
+                               continue;
 
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       ethtool_sprintf(strings, "tx-%u.tx_packets",
+                                       channel->tx_queue[0].queue /
+                                               EFX_MAX_TXQ_PER_CHANNEL);
                }
        }
        efx_for_each_channel(channel, efx) {
                if (efx_channel_has_rx_queue(channel)) {
                        n_stats++;
-                       if (strings != NULL) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "rx-%d.rx_packets", channel->channel);
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       if (!strings)
+                               continue;
+
+                       ethtool_sprintf(strings, "rx-%d.rx_packets",
+                                       channel->channel);
                }
        }
        if (efx->xdp_tx_queue_count && efx->xdp_tx_queues) {
@@ -428,11 +426,11 @@ static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
 
                for (xdp = 0; xdp < efx->xdp_tx_queue_count; xdp++) {
                        n_stats++;
-                       if (strings) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "tx-xdp-cpu-%hu.tx_packets", xdp);
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       if (!strings)
+                               continue;
+
+                       ethtool_sprintf(strings, "tx-xdp-cpu-%hu.tx_packets",
+                                       xdp);
                }
        }
 
@@ -464,15 +462,11 @@ void efx_ethtool_get_strings(struct net_device *net_dev,
 
        switch (string_set) {
        case ETH_SS_STATS:
-               strings += (efx->type->describe_stats(efx, strings) *
-                           ETH_GSTRING_LEN);
+               efx->type->describe_stats(efx, &strings);
                for (i = 0; i < EFX_ETHTOOL_SW_STAT_COUNT; i++)
-                       strscpy(strings + i * ETH_GSTRING_LEN,
-                               efx_sw_stat_desc[i].name, ETH_GSTRING_LEN);
-               strings += EFX_ETHTOOL_SW_STAT_COUNT * ETH_GSTRING_LEN;
-               strings += (efx_describe_per_queue_stats(efx, strings) *
-                           ETH_GSTRING_LEN);
-               efx_ptp_describe_stats(efx, strings);
+                       ethtool_puts(&strings, efx_sw_stat_desc[i].name);
+               efx_describe_per_queue_stats(efx, &strings);
+               efx_ptp_describe_stats(efx, &strings);
                break;
        case ETH_SS_TEST:
                efx_ethtool_fill_self_tests(efx, NULL, strings, NULL);
index f4db683b80f7ce9a913a2e0591fd1d2637850c2a..04766448a5458551dcd44bd214949b5780db5863 100644 (file)
@@ -353,7 +353,7 @@ static int ef4_ethtool_fill_self_tests(struct ef4_nic *efx,
        return n;
 }
 
-static size_t ef4_describe_per_queue_stats(struct ef4_nic *efx, u8 *strings)
+static size_t ef4_describe_per_queue_stats(struct ef4_nic *efx, u8 **strings)
 {
        size_t n_stats = 0;
        struct ef4_channel *channel;
@@ -361,24 +361,22 @@ static size_t ef4_describe_per_queue_stats(struct ef4_nic *efx, u8 *strings)
        ef4_for_each_channel(channel, efx) {
                if (ef4_channel_has_tx_queues(channel)) {
                        n_stats++;
-                       if (strings != NULL) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "tx-%u.tx_packets",
-                                        channel->tx_queue[0].queue /
-                                        EF4_TXQ_TYPES);
+                       if (!strings)
+                               continue;
 
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       ethtool_sprintf(strings, "tx-%u.tx_packets",
+                                       channel->tx_queue[0].queue /
+                                               EF4_TXQ_TYPES);
                }
        }
        ef4_for_each_channel(channel, efx) {
                if (ef4_channel_has_rx_queue(channel)) {
                        n_stats++;
-                       if (strings != NULL) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "rx-%d.rx_packets", channel->channel);
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       if (!strings)
+                               continue;
+
+                       ethtool_sprintf(strings, "rx-%d.rx_packets",
+                                       channel->channel);
                }
        }
        return n_stats;
@@ -409,14 +407,10 @@ static void ef4_ethtool_get_strings(struct net_device *net_dev,
 
        switch (string_set) {
        case ETH_SS_STATS:
-               strings += (efx->type->describe_stats(efx, strings) *
-                           ETH_GSTRING_LEN);
+               efx->type->describe_stats(efx, &strings);
                for (i = 0; i < EF4_ETHTOOL_SW_STAT_COUNT; i++)
-                       strscpy(strings + i * ETH_GSTRING_LEN,
-                               ef4_sw_stat_desc[i].name, ETH_GSTRING_LEN);
-               strings += EF4_ETHTOOL_SW_STAT_COUNT * ETH_GSTRING_LEN;
-               strings += (ef4_describe_per_queue_stats(efx, strings) *
-                           ETH_GSTRING_LEN);
+                       ethtool_puts(&strings, ef4_sw_stat_desc[i].name);
+               ef4_describe_per_queue_stats(efx, &strings);
                break;
        case ETH_SS_TEST:
                ef4_ethtool_fill_self_tests(efx, NULL, strings, NULL);
index 36114ce88034cb9b4ad25fd0086bd3a04910ebd1..4af56333ea49ab9edd5af680b30aa6d7f0a905d6 100644 (file)
@@ -2564,7 +2564,7 @@ static void falcon_remove_nic(struct ef4_nic *efx)
        efx->nic_data = NULL;
 }
 
-static size_t falcon_describe_nic_stats(struct ef4_nic *efx, u8 *names)
+static size_t falcon_describe_nic_stats(struct ef4_nic *efx, u8 **names)
 {
        return ef4_nic_describe_stats(falcon_stat_desc, FALCON_STAT_COUNT,
                                      falcon_stat_mask, names);
index a2c7139f2b323f21b1cf59a3207d093eee31092d..7ab0db44720da7c4cd8e8190ad100698ad32ccee 100644 (file)
@@ -1057,7 +1057,7 @@ struct ef4_nic_type {
        void (*finish_flush)(struct ef4_nic *efx);
        void (*prepare_flr)(struct ef4_nic *efx);
        void (*finish_flr)(struct ef4_nic *efx);
-       size_t (*describe_stats)(struct ef4_nic *efx, u8 *names);
+       size_t (*describe_stats)(struct ef4_nic *efx, u8 **names);
        size_t (*update_stats)(struct ef4_nic *efx, u64 *full_stats,
                               struct rtnl_link_stats64 *core_stats);
        void (*start_stats)(struct ef4_nic *efx);
index 1b91992e3698099589a05704eeadff5130db6776..a6304686bc900fc7e991004ab0936909bda42061 100644 (file)
@@ -444,18 +444,15 @@ void ef4_nic_get_regs(struct ef4_nic *efx, void *buf)
  * bits in the first @count bits of @mask for which a name is defined.
  */
 size_t ef4_nic_describe_stats(const struct ef4_hw_stat_desc *desc, size_t count,
-                             const unsigned long *mask, u8 *names)
+                             const unsigned long *mask, u8 **names)
 {
        size_t visible = 0;
        size_t index;
 
        for_each_set_bit(index, mask, count) {
                if (desc[index].name) {
-                       if (names) {
-                               strscpy(names, desc[index].name,
-                                       ETH_GSTRING_LEN);
-                               names += ETH_GSTRING_LEN;
-                       }
+                       if (names)
+                               ethtool_puts(names, desc[index].name);
                        ++visible;
                }
        }
index ac10c12967df230cedc7d3ee7e69dc8b6c919498..bc6ef937d0fe58a57da376c96556b4608271d4c5 100644 (file)
@@ -497,7 +497,7 @@ size_t ef4_nic_get_regs_len(struct ef4_nic *efx);
 void ef4_nic_get_regs(struct ef4_nic *efx, void *buf);
 
 size_t ef4_nic_describe_stats(const struct ef4_hw_stat_desc *desc, size_t count,
-                             const unsigned long *mask, u8 *names);
+                             const unsigned long *mask, u8 **names);
 void ef4_nic_update_stats(const struct ef4_hw_stat_desc *desc, size_t count,
                          const unsigned long *mask, u64 *stats,
                          const void *dma_buf, bool accumulate);
index b54662d32f55a2df43f23709cbeac5a6296191cd..620ba6ef3514bd5eb9abc38e3ea6171b65d61aa2 100644 (file)
@@ -1408,7 +1408,7 @@ struct efx_nic_type {
        int (*fini_dmaq)(struct efx_nic *efx);
        void (*prepare_flr)(struct efx_nic *efx);
        void (*finish_flr)(struct efx_nic *efx);
-       size_t (*describe_stats)(struct efx_nic *efx, u8 *names);
+       size_t (*describe_stats)(struct efx_nic *efx, u8 **names);
        size_t (*update_stats)(struct efx_nic *efx, u64 *full_stats,
                               struct rtnl_link_stats64 *core_stats);
        size_t (*update_stats_atomic)(struct efx_nic *efx, u64 *full_stats,
index a33ed473cc8af87ca950a719d1b918c38c9ab0d0..80aa5e9c732ae074f4667597f96532430072c6ce 100644 (file)
@@ -299,18 +299,15 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf)
  * bits in the first @count bits of @mask for which a name is defined.
  */
 size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
-                             const unsigned long *mask, u8 *names)
+                             const unsigned long *mask, u8 **names)
 {
        size_t visible = 0;
        size_t index;
 
        for_each_set_bit(index, mask, count) {
                if (desc[index].name) {
-                       if (names) {
-                               strscpy(names, desc[index].name,
-                                       ETH_GSTRING_LEN);
-                               names += ETH_GSTRING_LEN;
-                       }
+                       if (names)
+                               ethtool_puts(names, desc[index].name);
                        ++visible;
                }
        }
index 7ec4ac7b7ff5c5256e8a60b931bdb5b95ec9e9cf..821d91efda1954b745b9c21f8b50bd17d6311b10 100644 (file)
@@ -241,7 +241,7 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf);
 #define EFX_MC_STATS_GENERATION_INVALID ((__force __le64)(-1))
 
 size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
-                             const unsigned long *mask, u8 *names);
+                             const unsigned long *mask, u8 **names);
 int efx_nic_copy_stats(struct efx_nic *efx, __le64 *dest);
 void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count,
                          const unsigned long *mask, u64 *stats,
index 36bceeeb6483a7f852ef1d3b024367db518c85c3..4c7222bf26bec8dfc8468df419b69d9945821758 100644 (file)
@@ -399,7 +399,7 @@ static const unsigned long efx_ptp_stat_mask[] = {
        [0 ... BITS_TO_LONGS(PTP_STAT_COUNT) - 1] = ~0UL,
 };
 
-size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 *strings)
+size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 **strings)
 {
        if (!efx->ptp_data)
                return 0;
index feab7bdd7889d7295089b3e01b5d31592d107b74..cb9b077921e84fdf0ada221fdb7b834bab3ea77e 100644 (file)
@@ -30,7 +30,7 @@ int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
                        unsigned int new_mode);
 int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
 void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
-size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 *strings);
+size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 **strings);
 size_t efx_ptp_update_stats(struct efx_nic *efx, u64 *stats);
 void efx_time_sync_event(struct efx_channel *channel, efx_qword_t *ev);
 void __efx_rx_skb_attach_timestamp(struct efx_channel *channel,
index 075fef64de680ca25ac7d222ea33dad02b3bc51a..eeee676fdca7d1f1478f1a72426f0b747bea1379 100644 (file)
@@ -395,7 +395,7 @@ fail:
                test->flags |= ETH_TEST_FL_FAILED;
 }
 
-static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
+static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 **strings)
 {
        size_t n_stats = 0;
        struct efx_channel *channel;
@@ -403,24 +403,22 @@ static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
        efx_for_each_channel(channel, efx) {
                if (efx_channel_has_tx_queues(channel)) {
                        n_stats++;
-                       if (strings != NULL) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "tx-%u.tx_packets",
-                                        channel->tx_queue[0].queue /
-                                        EFX_MAX_TXQ_PER_CHANNEL);
+                       if (!strings)
+                               continue;
 
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       ethtool_sprintf(strings, "tx-%u.tx_packets",
+                                       channel->tx_queue[0].queue /
+                                               EFX_MAX_TXQ_PER_CHANNEL);
                }
        }
        efx_for_each_channel(channel, efx) {
                if (efx_channel_has_rx_queue(channel)) {
                        n_stats++;
-                       if (strings != NULL) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "rx-%d.rx_packets", channel->channel);
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       if (!strings)
+                               continue;
+
+                       ethtool_sprintf(strings, "rx-%d.rx_packets",
+                                       channel->channel);
                }
        }
        if (efx->xdp_tx_queue_count && efx->xdp_tx_queues) {
@@ -428,11 +426,11 @@ static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings)
 
                for (xdp = 0; xdp < efx->xdp_tx_queue_count; xdp++) {
                        n_stats++;
-                       if (strings) {
-                               snprintf(strings, ETH_GSTRING_LEN,
-                                        "tx-xdp-cpu-%hu.tx_packets", xdp);
-                               strings += ETH_GSTRING_LEN;
-                       }
+                       if (!strings)
+                               continue;
+
+                       ethtool_sprintf(strings, "tx-xdp-cpu-%hu.tx_packets",
+                                       xdp);
                }
        }
 
@@ -464,15 +462,11 @@ void efx_siena_ethtool_get_strings(struct net_device *net_dev,
 
        switch (string_set) {
        case ETH_SS_STATS:
-               strings += (efx->type->describe_stats(efx, strings) *
-                           ETH_GSTRING_LEN);
+               efx->type->describe_stats(efx, &strings);
                for (i = 0; i < EFX_ETHTOOL_SW_STAT_COUNT; i++)
-                       strscpy(strings + i * ETH_GSTRING_LEN,
-                               efx_sw_stat_desc[i].name, ETH_GSTRING_LEN);
-               strings += EFX_ETHTOOL_SW_STAT_COUNT * ETH_GSTRING_LEN;
-               strings += (efx_describe_per_queue_stats(efx, strings) *
-                           ETH_GSTRING_LEN);
-               efx_siena_ptp_describe_stats(efx, strings);
+                       ethtool_puts(&strings, efx_sw_stat_desc[i].name);
+               efx_describe_per_queue_stats(efx, &strings);
+               efx_siena_ptp_describe_stats(efx, &strings);
                break;
        case ETH_SS_TEST:
                efx_ethtool_fill_self_tests(efx, NULL, strings, NULL);
index 3fa7c652ae9b7cabd42d377abe62fd3c5bdb5b1f..9785eff10607beb585891abf96e98fba14742bf5 100644 (file)
@@ -1307,7 +1307,7 @@ struct efx_nic_type {
        void (*finish_flush)(struct efx_nic *efx);
        void (*prepare_flr)(struct efx_nic *efx);
        void (*finish_flr)(struct efx_nic *efx);
-       size_t (*describe_stats)(struct efx_nic *efx, u8 *names);
+       size_t (*describe_stats)(struct efx_nic *efx, u8 **names);
        size_t (*update_stats)(struct efx_nic *efx, u64 *full_stats,
                               struct rtnl_link_stats64 *core_stats);
        size_t (*update_stats_atomic)(struct efx_nic *efx, u64 *full_stats,
index 0ea0433a62301bbd343b987ae4a2be55d5928c34..32fce70085e330425d893410560d7b1ec7042c1f 100644 (file)
@@ -449,20 +449,20 @@ void efx_siena_get_regs(struct efx_nic *efx, void *buf)
  * Returns the number of visible statistics, i.e. the number of set
  * bits in the first @count bits of @mask for which a name is defined.
  */
-size_t efx_siena_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
-                               const unsigned long *mask, u8 *names)
+size_t efx_siena_describe_stats(const struct efx_hw_stat_desc *desc,
+                               size_t count, const unsigned long *mask,
+                               u8 **names)
 {
        size_t visible = 0;
        size_t index;
 
        for_each_set_bit(index, mask, count) {
                if (desc[index].name) {
-                       if (names) {
-                               strscpy(names, desc[index].name,
-                                       ETH_GSTRING_LEN);
-                               names += ETH_GSTRING_LEN;
-                       }
                        ++visible;
+                       if (!names)
+                               continue;
+
+                       ethtool_puts(names, desc[index].name);
                }
        }
 
index 3af0405eeaa44b5532d749f5ede1e5a8aa4a4617..b7fbe198008d6a05688c1a154d7b1d71779e5e80 100644 (file)
@@ -239,8 +239,9 @@ void efx_siena_get_regs(struct efx_nic *efx, void *buf);
 
 #define EFX_MC_STATS_GENERATION_INVALID ((__force __le64)(-1))
 
-size_t efx_siena_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
-                               const unsigned long *mask, u8 *names);
+size_t efx_siena_describe_stats(const struct efx_hw_stat_desc *desc,
+                               size_t count, const unsigned long *mask,
+                               u8 **names);
 void efx_siena_update_stats(const struct efx_hw_stat_desc *desc, size_t count,
                            const unsigned long *mask, u64 *stats,
                            const void *dma_buf, bool accumulate);
index 85005196b4c506810f583369d8f6e066ceff8c0c..062c77c9207749adfef38cb0e05d7a987b6faf6b 100644 (file)
@@ -393,7 +393,7 @@ static const unsigned long efx_ptp_stat_mask[] = {
        [0 ... BITS_TO_LONGS(PTP_STAT_COUNT) - 1] = ~0UL,
 };
 
-size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 *strings)
+size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 **strings)
 {
        if (!efx->ptp_data)
                return 0;
index b6133e7c56088be9d456b849a86400b00a35937b..54840036ab672838981f67aaa36982bcad52bbf9 100644 (file)
@@ -28,7 +28,7 @@ int efx_siena_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
                              unsigned int new_mode);
 int efx_siena_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
 void efx_siena_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
-size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 *strings);
+size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 **strings);
 size_t efx_siena_ptp_update_stats(struct efx_nic *efx, u64 *stats);
 void efx_siena_time_sync_event(struct efx_channel *channel, efx_qword_t *ev);
 void __efx_siena_rx_skb_attach_timestamp(struct efx_channel *channel,
index ca33dc08e555f2aa49da7d435ed689f1032dea32..49f0c8a1a90abab3c5f738c73833eae99dc1c532 100644 (file)
@@ -545,7 +545,7 @@ static const unsigned long siena_stat_mask[] = {
        [0 ... BITS_TO_LONGS(SIENA_STAT_COUNT) - 1] = ~0UL,
 };
 
-static size_t siena_describe_nic_stats(struct efx_nic *efx, u8 *names)
+static size_t siena_describe_nic_stats(struct efx_nic *efx, u8 **names)
 {
        return efx_siena_describe_stats(siena_stat_desc, SIENA_STAT_COUNT,
                                        siena_stat_mask, names);