From 3db9eb6dee8aacf27903bc84c3a68d05d1d49519 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 30 Oct 2023 09:54:14 +0100 Subject: [PATCH] Revert "staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t" This reverts commit a13f7e45823cd29af716ed6be1f53a344e0b9268. 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 Cc: Oliver Crumrine Signed-off-by: Greg Kroah-Hartman --- drivers/staging/octeon/ethernet.c | 2 +- drivers/staging/octeon/octeon-stubs.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 023b107e077a..9eee28f2940c 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -798,7 +798,7 @@ static int cvm_oct_probe(struct platform_device *pdev) num_interfaces = cvmx_helper_get_number_of_interfaces(); for (interface = 0; interface < num_interfaces; interface++) { - enum cvmx_helper_interface_mode imode = + cvmx_helper_interface_mode_t imode = cvmx_helper_interface_get_mode(interface); int num_ports = cvmx_helper_ports_on_interface(interface); int port; diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h index 0b0c609a771c..9f269626b862 100644 --- a/drivers/staging/octeon/octeon-stubs.h +++ b/drivers/staging/octeon/octeon-stubs.h @@ -220,7 +220,7 @@ enum cvmx_spi_mode { CVMX_SPI_MODE_DUPLEX = 3 }; -enum cvmx_helper_interface_mode { +typedef enum { CVMX_HELPER_INTERFACE_MODE_DISABLED, CVMX_HELPER_INTERFACE_MODE_RGMII, CVMX_HELPER_INTERFACE_MODE_GMII, @@ -231,7 +231,7 @@ enum cvmx_helper_interface_mode { CVMX_HELPER_INTERFACE_MODE_PICMG, CVMX_HELPER_INTERFACE_MODE_NPI, CVMX_HELPER_INTERFACE_MODE_LOOP, -}; +} cvmx_helper_interface_mode_t; typedef enum { CVMX_POW_WAIT = 1, @@ -1265,8 +1265,8 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear, cvmx_pko_port_status_t *status) { } -static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int - interface) +static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int + interface) { return 0; }