]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: octeon: convert cvmx_pko_status_t from typedef to plain enum
authorEric Wu <kunjinkao.jp@gmail.com>
Mon, 27 Apr 2026 15:54:25 +0000 (23:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 May 2026 14:21:34 +0000 (16:21 +0200)
The Linux kernel coding style discourages the use of typedefs for
enums. Convert cvmx_pko_status_t to a plain 'enum cvmx_pko_status' 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@gmail.com>
Link: https://patch.msgid.link/20260427155427.668540-6-kunjinkao.jp@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/cavium-octeon/executive/cvmx-pko.c
arch/mips/include/asm/octeon/cvmx-pko.h
drivers/staging/octeon/octeon-stubs.h

index 760abbe124797f36f8735df1ac055616132ce103..b0199d5cb551f69c324be092ea78dd73d5c4c54e 100644 (file)
@@ -323,11 +323,11 @@ EXPORT_SYMBOL_GPL(cvmx_pko_shutdown);
  *                  queues have higher priority than higher numbered queues.
  *                  There must be num_queues elements in the array.
  */
-cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, uint64_t base_queue,
+enum cvmx_pko_status cvmx_pko_config_port(uint64_t port, uint64_t base_queue,
                                       uint64_t num_queues,
                                       const uint64_t priority[])
 {
-       cvmx_pko_status_t result_code;
+       enum cvmx_pko_status result_code;
        uint64_t queue;
        union cvmx_pko_mem_queue_ptrs config;
        union cvmx_pko_reg_queue_ptrs1 config1;
index d8e74a305646578d2ae45eef889dcbb4b3d6e567..a742c1d61d8f806773bb1543efaa9137305057ec 100644 (file)
@@ -80,7 +80,7 @@
 #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF
 #define CVMX_PKO_MAX_QUEUE_DEPTH 0
 
-typedef enum {
+enum cvmx_pko_status {
        CVMX_PKO_SUCCESS,
        CVMX_PKO_INVALID_PORT,
        CVMX_PKO_INVALID_QUEUE,
@@ -88,7 +88,7 @@ typedef enum {
        CVMX_PKO_NO_MEMORY,
        CVMX_PKO_PORT_ALREADY_SETUP,
        CVMX_PKO_CMD_QUEUE_INIT_ERROR
-} cvmx_pko_status_t;
+};
 
 /**
  * This enumeration represents the different locking modes supported by PKO.
@@ -306,7 +306,7 @@ extern void cvmx_pko_shutdown(void);
  *                  of a value of 1. There must be num_queues elements in the
  *                  array.
  */
-extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port,
+extern enum cvmx_pko_status cvmx_pko_config_port(uint64_t port,
                                              uint64_t base_queue,
                                              uint64_t num_queues,
                                              const uint64_t priority[]);
@@ -414,7 +414,7 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue,
  * Returns: CVMX_PKO_SUCCESS on success, or error code on
  * failure of output
  */
-static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(
+static inline enum cvmx_pko_status cvmx_pko_send_packet_finish(
        uint64_t port,
        uint64_t queue,
        union cvmx_pko_command_word0 pko_command,
@@ -457,7 +457,7 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(
  * Returns: CVMX_PKO_SUCCESS on success, or error code on
  * failure of output
  */
-static inline cvmx_pko_status_t cvmx_pko_send_packet_finish3(
+static inline enum cvmx_pko_status cvmx_pko_send_packet_finish3(
        uint64_t port,
        uint64_t queue,
        union cvmx_pko_command_word0 pko_command,
index 06cb4f15d9d51fd3e03b3aafbad728ff3775f9f1..8496c60d647e0b6ba120743dfa98c894855c25ad 100644 (file)
@@ -246,7 +246,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,
@@ -254,7 +254,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,
@@ -1386,7 +1386,7 @@ static inline void cvmx_pko_send_packet_prepare(u64 port, u64 queue,
                                                enum cvmx_pko_lock use_locking)
 { }
 
-static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(u64 port,
+static inline enum cvmx_pko_status cvmx_pko_send_packet_finish(u64 port,
                u64 queue, union cvmx_pko_command_word0 pko_command,
                union cvmx_buf_ptr packet, enum cvmx_pko_lock use_locking)
 {