Skip to contentSkip to conversation

staging: octeon: remove typedef in enum cvmx_spi_mode_t

PATCH In review Oliver Crumrine 4 participants 11 messages Aug 28, 2023 – Oct 30, 2023 1 message not in the archive Staging

lore
Share & tools
lore
#1 lore raw

PATCH v5 1/6 staging: octeon: remove typedef in enum cvmx_spi_mode_t

In reply to a message not in the archive

Remove typedef in enum cvmx_spi_mode_t, and rename all instances to cvmx_spi_mode

---
v5: More descriptive commit descriptions
v4: No change in this file
v3: No change in this file
v2: Send the patch set properly, with messages in a single thread

 drivers/staging/octeon/octeon-stubs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +3 -3
index 3e7b92cd2e35..9f269626b862 100644
@@ -213,12 +213,12 @@ enum cvmx_fau_op_size {
 	CVMX_FAU_OP_SIZE_64 = 3
 };
 
-typedef enum {
+enum cvmx_spi_mode {
 	CVMX_SPI_MODE_UNKNOWN = 0,
 	CVMX_SPI_MODE_TX_HALFPLEX = 1,
 	CVMX_SPI_MODE_RX_HALFPLEX = 2,
 	CVMX_SPI_MODE_DUPLEX = 3
-} cvmx_spi_mode_t;
+};
 
 typedef enum {
 	CVMX_HELPER_INTERFACE_MODE_DISABLED,
@@ -1362,7 +1362,7 @@ static inline struct cvmx_wqe *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
 }
 
 static inline int cvmx_spi_restart_interface(int interface,
-					cvmx_spi_mode_t mode, int timeout)
+					enum cvmx_spi_mode mode, int timeout)
 {
 	return 0;
 }
Signature · 1 line
2.39.3
#2 lore raw

PATCH v5 2/6 staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

In reply to a message not in the archive

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances to cvmx_helper_interface_mode

---
v5: More descriptive commit descriptions
v4: No change in this file
v3: No change in this file
v2: Send the patch set properly, with messages in a single thread

 drivers/staging/octeon/ethernet.c     | 2 +-
 drivers/staging/octeon/octeon-stubs.h | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/octeon/ethernet.c +1 -1
index 9eee28f2940c..023b107e077a 100644
@@ -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++) {
-		cvmx_helper_interface_mode_t imode =
+		enum cvmx_helper_interface_mode imode =
 		    cvmx_helper_interface_get_mode(interface);
 		int num_ports = cvmx_helper_ports_on_interface(interface);
 		int port;
drivers/staging/octeon/octeon-stubs.h +4 -4
index 9f269626b862..0b0c609a771c 100644
@@ -220,7 +220,7 @@ enum cvmx_spi_mode {
 	CVMX_SPI_MODE_DUPLEX = 3
 };
 
-typedef enum {
+enum cvmx_helper_interface_mode {
 	CVMX_HELPER_INTERFACE_MODE_DISABLED,
 	CVMX_HELPER_INTERFACE_MODE_RGMII,
 	CVMX_HELPER_INTERFACE_MODE_GMII,
@@ -231,7 +231,7 @@ typedef enum {
 	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 cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int
-								   interface)
+static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int
+								       interface)
 {
 	return 0;
 }
Signature · 1 line
2.39.3
#8 lore raw

PATCH v5 3/6 staging: octeon: remove typedef in enum cvmx_pow_wait_t

In reply to a message not in the archive

Remove typedef in enum cvmx_pow_wait_t, and rename all instances to cvmx_pow_wait

---
v5: More descriptive commit descriptions
v4: No change in this file
v3: No change in this file
v2: Send the patch set properly, with messages in a single thread

 drivers/staging/octeon/octeon-stubs.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/octeon/octeon-stubs.h +5 -5
index 0b0c609a771c..4470c985dc5d 100644
@@ -233,10 +233,10 @@ enum cvmx_helper_interface_mode {
 	CVMX_HELPER_INTERFACE_MODE_LOOP,
 };
 
-typedef enum {
+enum cvmx_pow_wait {
 	CVMX_POW_WAIT = 1,
 	CVMX_POW_NO_WAIT = 0,
-} cvmx_pow_wait_t;
+};
 
 typedef enum {
 	CVMX_PKO_LOCK_NONE = 0,
@@ -1342,11 +1342,11 @@ static inline unsigned int cvmx_get_core_num(void)
 }
 
 static inline void cvmx_pow_work_request_async_nocheck(int scr_addr,
-						       cvmx_pow_wait_t wait)
+						       enum cvmx_pow_wait wait)
 { }
 
 static inline void cvmx_pow_work_request_async(int scr_addr,
-					       cvmx_pow_wait_t wait)
+					       enum cvmx_pow_wait wait)
 { }
 
 static inline struct cvmx_wqe *cvmx_pow_work_response_async(int scr_addr)
@@ -1356,7 +1356,7 @@ static inline struct cvmx_wqe *cvmx_pow_work_response_async(int scr_addr)
 	return wqe;
 }
 
-static inline struct cvmx_wqe *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
+static inline struct cvmx_wqe *cvmx_pow_work_request_sync(enum cvmx_pow_wait wait)
 {
 	return (void *)(unsigned long)wait;
 }
Signature · 1 line
2.39.3
#9 lore raw

PATCH v5 4/6 staging: octeon: remove typedef in struct cvmx_pko_lock_t

In reply to a message not in the archive

Remove typedef in struct cvmx_pko_lock_t, and rename all instances to cvmx_pko_lock

---
v5: More descriptive commit descriptions
v4: No change in this file
v3: No change in this file
v2: Send the patch set properly, with messages in a single thread

 drivers/staging/octeon/octeon-stubs.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/octeon/octeon-stubs.h +4 -4
index 4470c985dc5d..2cdbcbd8a97b 100644
@@ -238,11 +238,11 @@ enum cvmx_pow_wait {
 	CVMX_POW_NO_WAIT = 0,
 };
 
-typedef enum {
+enum cvmx_pko_lock {
 	CVMX_PKO_LOCK_NONE = 0,
 	CVMX_PKO_LOCK_ATOMIC_TAG = 1,
 	CVMX_PKO_LOCK_CMD_QUEUE = 2,
-} cvmx_pko_lock_t;
+};
 
 typedef enum {
 	CVMX_PKO_SUCCESS,
@@ -1381,12 +1381,12 @@ static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interfac
 }
 
 static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue,
-						cvmx_pko_lock_t use_locking)
+						enum cvmx_pko_lock use_locking)
 { }
 
 static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
 		uint64_t queue, union cvmx_pko_command_word0 pko_command,
-		union cvmx_buf_ptr packet, cvmx_pko_lock_t use_locking)
+		union cvmx_buf_ptr packet, enum cvmx_pko_lock use_locking)
 {
 	return 0;
 }
Signature · 1 line
2.39.3
#10 lore raw

PATCH v5 5/6 staging: octeon: remove typedef in enum cvmx_pko_status_t

In reply to a message not in the archive

Remove typedef in enum cmvx_pko_status_t, and rename all instances to cvmx_pko_status

---
v5: More descriptive commit descriptions
v4: No change in this file
v3: No change in this file
v2: Send the patch set properly, with messages in a single thread

 drivers/staging/octeon/octeon-stubs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +3 -3
index 2cdbcbd8a97b..b9852994882b 100644
@@ -244,7 +244,7 @@ enum cvmx_pko_lock {
 	CVMX_PKO_LOCK_CMD_QUEUE = 2,
 };
 
-typedef enum {
+enum cvmx_pko_status {
 	CVMX_PKO_SUCCESS,
 	CVMX_PKO_INVALID_PORT,
 	CVMX_PKO_INVALID_QUEUE,
@@ -252,7 +252,7 @@ typedef enum {
 	CVMX_PKO_NO_MEMORY,
 	CVMX_PKO_PORT_ALREADY_SETUP,
 	CVMX_PKO_CMD_QUEUE_INIT_ERROR
-} cvmx_pko_status_t;
+};
 
 enum cvmx_pow_tag_type {
 	CVMX_POW_TAG_TYPE_ORDERED   = 0L,
@@ -1384,7 +1384,7 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue,
 						enum cvmx_pko_lock use_locking)
 { }
 
-static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
+static inline enum cvmx_pko_status cvmx_pko_send_packet_finish(uint64_t port,
 		uint64_t queue, union cvmx_pko_command_word0 pko_command,
 		union cvmx_buf_ptr packet, enum cvmx_pko_lock use_locking)
 {
Signature · 1 line
2.39.3
#11 lore raw

PATCH v5 6/6 staging: octeon: remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_status_t

In reply to a message not in the archive

Remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_status_t, and rename all instances to cvmx_pip_port_status, and cvmx_pko_port_status, respectively

---
v5: More descriptive commit descriptions
v4: Forgot to rename all instances of another struct
v3: Forgot to rename all instances of a struct
v2: Send the patch set properly, with messages in a single thread

 drivers/staging/octeon/ethernet.c     |  4 ++--
 drivers/staging/octeon/octeon-stubs.h | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/octeon/ethernet.c +2 -2
index 023b107e077a..8e1f4b987a25 100644
@@ -201,8 +201,8 @@ EXPORT_SYMBOL(cvm_oct_free_work);
  */
 static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
 {
-	cvmx_pip_port_status_t rx_status;
-	cvmx_pko_port_status_t tx_status;
+	struct cvmx_pip_port_status rx_status;
+	struct cvmx_pko_port_status tx_status;
 	struct octeon_ethernet *priv = netdev_priv(dev);
 
 	if (priv->port < CVMX_PIP_NUM_INPUT_PORTS) {
drivers/staging/octeon/octeon-stubs.h +6 -6
index b9852994882b..579c755cfdc0 100644
@@ -384,7 +384,7 @@ union cvmx_ipd_sub_port_qos_cnt {
 	} s;
 };
 
-typedef struct {
+struct cvmx_pip_port_status {
 	uint32_t dropped_octets;
 	uint32_t dropped_packets;
 	uint32_t pci_raw_packets;
@@ -407,13 +407,13 @@ typedef struct {
 	uint32_t inb_packets;
 	uint64_t inb_octets;
 	uint16_t inb_errors;
-} cvmx_pip_port_status_t;
+};
 
-typedef struct {
+struct cvmx_pko_port_status {
 	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,
-					    cvmx_pip_port_status_t *status)
+					    struct cvmx_pip_port_status *status)
 { }
 
 static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear,
-					    cvmx_pko_port_status_t *status)
+					    struct cvmx_pko_port_status *status)
 { }
 
 static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int
Signature · 1 line
2.39.3
#3 lore raw

Re: [PATCH v5 2/6] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

In reply to Oliver Crumrine
Quoted 4 lines · Oliver Crumrine

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances to cvmx_helper_interface_mode

In linux-next:

Building mips:cavium_octeon_defconfig ... failed
--------------
Error log:
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable] drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_probe':
drivers/staging/octeon/ethernet.c:801:22: error: variable 'imode' has initializer but incomplete type
801 | enum cvmx_helper_interface_mode imode =

      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/staging/octeon/ethernet.c:801:49: error: storage size of 'imode' isn't known
801 | enum cvmx_helper_interface_mode imode =
| ^~~~~
drivers/staging/octeon/ethernet.c:801:49: warning: unused variable 'imode' [-Wunused-variable]

Bisect points to this patch. Bisect log attached.

As usual, my apologies for the noise if this has already been reported and/or fixed.

Guenter

---
# bad: [66f1e1ea3548378ff6387b1ce0b40955d54e86aa] Add linux-next specific files for 20231027
# good: [05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1] Linux 6.6-rc7
git bisect start 'HEAD' 'v6.6-rc7'
# good: [5ba945807e7caa7aeb2111b8259f7474919c067b] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
git bisect good 5ba945807e7caa7aeb2111b8259f7474919c067b
# good: [dd91766be714f0b06fe9dbba660e37623d8200d4] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git
git bisect good dd91766be714f0b06fe9dbba660e37623d8200d4
# good: [06915762e0427a51262d17147ccd28659635452e] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git
git bisect good 06915762e0427a51262d17147ccd28659635452e
# bad: [642f5501bdbd0030056348abd970708e8c3bd67b] Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git bisect bad 642f5501bdbd0030056348abd970708e8c3bd67b
# good: [ec6cf0d999ec6efbad23438bc24312377a3f4391] Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
git bisect good ec6cf0d999ec6efbad23438bc24312377a3f4391
# good: [c306097335a2d271f64ce8346bd4d1cbe2b30557] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
git bisect good c306097335a2d271f64ce8346bd4d1cbe2b30557
# bad: [b25c17e5c2497d13857772d411142daa20c70e59] staging: qlge: Replace the occurrences of (1<<x) by BIT(x)
git bisect bad b25c17e5c2497d13857772d411142daa20c70e59
# bad: [d50f64b5520311cacf38b8c2c240c5955c815d10] staging: rtl8192e: Resolve circular locking with rx_pkt_pending_timer git bisect bad d50f64b5520311cacf38b8c2c240c5955c815d10
# good: [87f8e11d5147992fe0b8c232e656be96f778408e] staging: rtl8192e: Replace control subframe types with IEEE80211_STYPE_* git bisect good 87f8e11d5147992fe0b8c232e656be96f778408e
# bad: [7458fdf8a778b14ad814c9c13695d0c85b210afa] Staging: rtl8192e: Rename variable Time
git bisect bad 7458fdf8a778b14ad814c9c13695d0c85b210afa
# bad: [8d26aa90458f82b952dcaa64e7c4afed9c862d68] staging: octeon: remove typedef in struct cvmx_pko_lock_t
git bisect bad 8d26aa90458f82b952dcaa64e7c4afed9c862d68
# good: [571fa9b51375eee059846c780dce05f04528b065] staging: vme_user: fix check unnecessary blank lines in vme_fake.c
git bisect good 571fa9b51375eee059846c780dce05f04528b065
# good: [7bebd832177670e6cce1783cf144f989cd3cf4b5] staging: octeon: remove typedef in enum cvmx_spi_mode_t
git bisect good 7bebd832177670e6cce1783cf144f989cd3cf4b5
# bad: [28fae776c69bdac005fa77a7e0daa64725d0f4f8] staging: octeon: remove typedef in enum cvmx_pow_wait_t
git bisect bad 28fae776c69bdac005fa77a7e0daa64725d0f4f8
# bad: [a13f7e45823cd29af716ed6be1f53a344e0b9268] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t git bisect bad a13f7e45823cd29af716ed6be1f53a344e0b9268

# first bad commit: [a13f7e45823cd29af716ed6be1f53a344e0b9268] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t
maintainer
#4 lore raw

Re: [PATCH v5 2/6] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

Quoted 31 lines · Guenter Roeck
Quoted 4 lines · Oliver Crumrine

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances to cvmx_helper_interface_mode

In linux-next:

Building mips:cavium_octeon_defconfig ... failed
--------------
Error log:
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable] drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_probe':
drivers/staging/octeon/ethernet.c:801:22: error: variable 'imode' has initializer but incomplete type
801 | enum cvmx_helper_interface_mode imode =

      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/staging/octeon/ethernet.c:801:49: error: storage size of 'imode' isn't known
801 | enum cvmx_helper_interface_mode imode =
| ^~~~~
drivers/staging/octeon/ethernet.c:801:49: warning: unused variable 'imode' [-Wunused-variable]

Quoted 4 lines

Bisect points to this patch. Bisect log attached.

As usual, my apologies for the noise if this has already been reported and/or fixed.

It has not been reported, thanks for it, I'll go revert the offending commits. And I need to figure out how to build this driver better, I get no build-failures from anyone for it when stuff like this happens, odd...

thanks,

greg k-h

#5 lore raw

Re: [PATCH v5 2/6] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

Quoted 34 lines · Greg KH
Quoted 33 lines · Guenter Roeck
Quoted 4 lines · Oliver Crumrine

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances to cvmx_helper_interface_mode

In linux-next:

Building mips:cavium_octeon_defconfig ... failed
--------------
Error log:
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable] drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_probe':
drivers/staging/octeon/ethernet.c:801:22: error: variable 'imode' has initializer but incomplete type
801 | enum cvmx_helper_interface_mode imode =

      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/staging/octeon/ethernet.c:801:49: error: storage size of 'imode' isn't known
801 | enum cvmx_helper_interface_mode imode =
| ^~~~~
drivers/staging/octeon/ethernet.c:801:49: warning: unused variable 'imode' [-Wunused-variable]

Bisect points to this patch. Bisect log attached.

Quoted 7 lines
Quoted 2 lines

As usual, my apologies for the noise if this has already been reported and/or fixed.

It has not been reported, thanks for it, I'll go revert the offending commits. And I need to figure out how to build this driver better, I get no build-failures from anyone for it when stuff like this happens, odd...

We did report it.

https://lore.kernel.org/all/CA+G9fYvVETLEtiZ=MFRrxgXpmgirVHz-tDOxhU=7_9dtmx7o5g@mail.gmail.com/

It only fails for Octeon def_configs. Just cross compiling on ARM isn't enough. All the stub code is just for compile testing and doesn't work...

regards,
dan carpenter

maintainer
#6 lore raw

Re: [PATCH v5 2/6] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

Quoted 38 lines · Dan Carpenter
Quoted 37 lines · Greg KH
Quoted 35 lines · Guenter Roeck
Quoted 4 lines · Oliver Crumrine

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances to cvmx_helper_interface_mode

In linux-next:

Building mips:cavium_octeon_defconfig ... failed
--------------
Error log:
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable] drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_probe':
drivers/staging/octeon/ethernet.c:801:22: error: variable 'imode' has initializer but incomplete type
801 | enum cvmx_helper_interface_mode imode =

      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/staging/octeon/ethernet.c:801:49: error: storage size of 'imode' isn't known
801 | enum cvmx_helper_interface_mode imode =
| ^~~~~
drivers/staging/octeon/ethernet.c:801:49: warning: unused variable 'imode' [-Wunused-variable]

Bisect points to this patch. Bisect log attached.

As usual, my apologies for the noise if this has already been reported and/or fixed.

Quoted 8 lines
Quoted 4 lines

It has not been reported, thanks for it, I'll go revert the offending commits. And I need to figure out how to build this driver better, I get no build-failures from anyone for it when stuff like this happens, odd...

We did report it.

https://lore.kernel.org/all/CA+G9fYvVETLEtiZ=MFRrxgXpmgirVHz-tDOxhU=7_9dtmx7o5g@mail.gmail.com/

Ick, missed that, sorry.

Quoted 3 lines

It only fails for Octeon def_configs. Just cross compiling on ARM isn't enough. All the stub code is just for compile testing and doesn't work...

Ah, that makes more sense. Sorry for missing this previously.

greg k-h

#7 lore raw

Re: [PATCH v5 2/6] staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t

In reply to Greg KH
Quoted 34 lines · Greg KH
Quoted 33 lines · Guenter Roeck
Quoted 4 lines · Oliver Crumrine

Remove typedef in enum cvmx_helper_interface_mode_t, and rename all instances to cvmx_helper_interface_mode

In linux-next:

Building mips:cavium_octeon_defconfig ... failed
--------------
Error log:
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable] drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_probe':
drivers/staging/octeon/ethernet.c:801:22: error: variable 'imode' has initializer but incomplete type
801 | enum cvmx_helper_interface_mode imode =

       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/staging/octeon/ethernet.c:801:49: error: storage size of 'imode' isn't known
801 | enum cvmx_helper_interface_mode imode =
| ^~~~~
drivers/staging/octeon/ethernet.c:801:49: warning: unused variable 'imode' [-Wunused-variable]

Bisect points to this patch. Bisect log attached.

Quoted 8 lines
Quoted 2 lines

As usual, my apologies for the noise if this has already been reported and/or fixed.

It has not been reported, thanks for it, I'll go revert the offending commits. And I need to figure out how to build this driver better, I get no build-failures from anyone for it when stuff like this happens, odd...

This is kind of chronic. One really has to build mips:cavium_octeon_defconfig to find Octeon related problems. The all{mod,yes}_defconfig builds don't build that code.

Guenter