From: Eric Wu Date: Mon, 27 Apr 2026 15:54:23 +0000 (+0800) Subject: staging: octeon: convert cvmx_pow_wait_t from typedef to plain enum X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=3711d19ae08b455d9f5e3613685bb41554d79a27;p=thirdparty%2Fkernel%2Flinux.git staging: octeon: convert cvmx_pow_wait_t from typedef to plain enum 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 Link: https://patch.msgid.link/20260427155427.668540-4-kunjinkao.jp@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/mips/include/asm/octeon/cvmx-pow.h b/arch/mips/include/asm/octeon/cvmx-pow.h index 21b4378244faf..409029809639f 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 6c0329270464d..df0456417f157 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; }