Revert "staging: octeon: remove typedef in structs cvmx_pip_port_status_t and cvmx_pk...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Oct 2023 08:54:10 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Oct 2023 08:56:09 +0000 (09:56 +0100)
This reverts commit b33a296d831189d8a8eedee360e889509b9c81e6.

The patch series that removed typedefs from the octeon driver was not
actually built properly, and broke the build (it's hard to test-build
this driver for some reason.)  Remove them all at this point in time to
make sure the build works properly.

Link: https://lore.kernel.org/r/32e9ad3c-191e-4dd1-b1cc-07f7b93c3f28@roeck-us.net
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Oliver Crumrine <ozlinux@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet.c
drivers/staging/octeon/octeon-stubs.h

index 8e1f4b987a25cb42085e976e8d00220633d17845..023b107e077a6b9e0efaec2d59aa8f09cebe7b9c 100644 (file)
@@ -201,8 +201,8 @@ EXPORT_SYMBOL(cvm_oct_free_work);
  */
 static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
 {
-       struct cvmx_pip_port_status rx_status;
-       struct cvmx_pko_port_status tx_status;
+       cvmx_pip_port_status_t rx_status;
+       cvmx_pko_port_status_t tx_status;
        struct octeon_ethernet *priv = netdev_priv(dev);
 
        if (priv->port < CVMX_PIP_NUM_INPUT_PORTS) {
index 579c755cfdc06d5fe0d08d4f7a32e11ed3fd4665..b9852994882b6d2d886e34844ceb4c633b03583c 100644 (file)
@@ -384,7 +384,7 @@ union cvmx_ipd_sub_port_qos_cnt {
        } s;
 };
 
-struct cvmx_pip_port_status {
+typedef struct {
        uint32_t dropped_octets;
        uint32_t dropped_packets;
        uint32_t pci_raw_packets;
@@ -407,13 +407,13 @@ struct cvmx_pip_port_status {
        uint32_t inb_packets;
        uint64_t inb_octets;
        uint16_t inb_errors;
-};
+} cvmx_pip_port_status_t;
 
-struct cvmx_pko_port_status {
+typedef struct {
        uint32_t packets;
        uint64_t octets;
        uint64_t doorbell;
-};
+} cvmx_pko_port_status_t;
 
 union cvmx_pip_frm_len_chkx {
        uint64_t u64;
@@ -1258,11 +1258,11 @@ static inline int octeon_is_simulation(void)
 }
 
 static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t clear,
-                                           struct cvmx_pip_port_status *status)
+                                           cvmx_pip_port_status_t *status)
 { }
 
 static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear,
-                                           struct cvmx_pko_port_status *status)
+                                           cvmx_pko_port_status_t *status)
 { }
 
 static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int