[PATCH 3/7] staging: octeon: convert cvmx_pow_wait_t from typedef to plain enum
From: Eric Wu
Date: Mon Apr 27 2026 - 12:09:15 EST
The Linux kernel coding style discourages the use of typedefs for
enums. Convert cvmx_pow_wait_t to a plain 'enum cvmx_pow_wait' and
update all users across the MIPS Octeon architecture code and the
staging driver stubs.
No functional change.
Signed-off-by: Eric Wu <kunjinkao.jp@xxxxxxxxx>
---
arch/mips/include/asm/octeon/cvmx-pow.h | 12 ++++++------
drivers/staging/octeon/octeon-stubs.h | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/mips/include/asm/octeon/cvmx-pow.h b/arch/mips/include/asm/octeon/cvmx-pow.h
index 21b4378244fa..409029809639 100644
--- a/arch/mips/include/asm/octeon/cvmx-pow.h
+++ b/arch/mips/include/asm/octeon/cvmx-pow.h
@@ -84,10 +84,10 @@ enum cvmx_pow_tag_type {
/**
* Wait flag values for pow functions.
*/
-typedef enum {
+enum cvmx_pow_wait {
CVMX_POW_WAIT = 1,
CVMX_POW_NO_WAIT = 0,
-} cvmx_pow_wait_t;
+};
/**
* POW tag operations. These are used in the data stored to the POW.
@@ -1348,7 +1348,7 @@ static inline void cvmx_pow_tag_sw_wait(void)
* Returns: the WQE pointer from POW. Returns NULL if no work
* was available.
*/
-static inline struct cvmx_wqe *cvmx_pow_work_request_sync_nocheck(cvmx_pow_wait_t
+static inline struct cvmx_wqe *cvmx_pow_work_request_sync_nocheck(enum cvmx_pow_wait
wait)
{
cvmx_pow_load_addr_t ptr;
@@ -1382,7 +1382,7 @@ static inline struct cvmx_wqe *cvmx_pow_work_request_sync_nocheck(cvmx_pow_wait_
* Returns: the WQE pointer from POW. Returns NULL if no work
* was available.
*/
-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)
{
if (CVMX_ENABLE_POW_CHECKS)
__cvmx_pow_warn_if_pending_switch(__func__);
@@ -1436,7 +1436,7 @@ static inline enum cvmx_pow_tag_type cvmx_pow_work_request_null_rd(void)
* timeout), 0 to cause response to return immediately
*/
static inline void cvmx_pow_work_request_async_nocheck(int scr_addr,
- cvmx_pow_wait_t wait)
+ enum cvmx_pow_wait wait)
{
cvmx_pow_iobdma_store_t data;
@@ -1465,7 +1465,7 @@ static inline void cvmx_pow_work_request_async_nocheck(int scr_addr,
* timeout), 0 to cause response to return immediately
*/
static inline void cvmx_pow_work_request_async(int scr_addr,
- cvmx_pow_wait_t wait)
+ enum cvmx_pow_wait wait)
{
if (CVMX_ENABLE_POW_CHECKS)
__cvmx_pow_warn_if_pending_switch(__func__);
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 6c0329270464..df0456417f15 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -235,10 +235,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,
@@ -1344,11 +1344,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)
@@ -1358,7 +1358,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;
}
--
2.43.0