From: Eric Wu <kunjinkao.jp@gmail.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-mips@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Eric Wu <kunjinkao.jp@gmail.com>
Subject: [PATCH 5/7] staging: octeon: convert cvmx_pko_status_t from typedef to plain enum
Date: Mon, 27 Apr 2026 23:54:25 +0800 [thread overview]
Message-ID: <20260427155427.668540-6-kunjinkao.jp@gmail.com> (raw)
In-Reply-To: <20260427155427.668540-1-kunjinkao.jp@gmail.com>
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>
---
arch/mips/cavium-octeon/executive/cvmx-pko.c | 4 ++--
arch/mips/include/asm/octeon/cvmx-pko.h | 10 +++++-----
drivers/staging/octeon/octeon-stubs.h | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-pko.c b/arch/mips/cavium-octeon/executive/cvmx-pko.c
index 760abbe12479..b0199d5cb551 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-pko.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-pko.c
@@ -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;
diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h
index d8e74a305646..a742c1d61d8f 100644
--- a/arch/mips/include/asm/octeon/cvmx-pko.h
+++ b/arch/mips/include/asm/octeon/cvmx-pko.h
@@ -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,
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 06cb4f15d9d5..8496c60d647e 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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)
{
--
2.43.0
next prev parent reply other threads:[~2026-04-27 15:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 15:54 [PATCH 0/7] staging: octeon: remove typedefs for enums and structs Eric Wu
2026-04-27 15:54 ` [PATCH 1/7] staging: octeon: convert cvmx_spi_mode_t from typedef to plain enum Eric Wu
2026-04-27 15:54 ` [PATCH 2/7] staging: octeon: convert cvmx_helper_interface_mode_t " Eric Wu
2026-04-27 15:54 ` [PATCH 3/7] staging: octeon: convert cvmx_pow_wait_t " Eric Wu
2026-04-27 15:54 ` [PATCH 4/7] staging: octeon: convert cvmx_pko_lock_t " Eric Wu
2026-04-27 15:54 ` Eric Wu [this message]
2026-04-27 15:54 ` [PATCH 6/7] staging: octeon: convert cvmx_pko_port_status_t from typedef to plain struct Eric Wu
2026-04-27 15:54 ` [PATCH 7/7] staging: octeon: convert cvmx_pip_port_status_t " Eric Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260427155427.668540-6-kunjinkao.jp@gmail.com \
--to=kunjinkao.jp@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox