2023-10-21 10:15:02

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 0/7] staging: octeon: Fix warnings due to introduction of new typedefs

This patch series fixes (removes) the introduction of several new typedefs
for enums and structs in the octeon driver. First the declarations are
fixed and then implementations are updated to remove references to the
old typedefs.

Changelog:
* v1 -> v2: Fix breaking change spread across multiple patches
* v2 -> v3: Break changes up into individual patches for each removed
typedef

Jonathan Bergh (7):
staging: octeon: Fix introduction of new enum typedef cvmx_spi_mode_t
in octeon
staging: octeon: Fix up introduction of new typedef
cvmx_helper_interface_mode_t in octeon
staging: octeon: Fix introduction of following new typedef
cvmx_pow_wait_t in octeon
staging: octeon: Fix up introduction of new typedef cvmx_pko_lock_t in
octeon
staging: octeon: Fix introduction of new typedef cvmx_pko_status_t in
octeon
staging: octeon: Fix introduction of new typedef
cvmx_pip_port_status_t in octeon
staging: octeon: Fix introduction of new typedef
cvmx_pko_port_status_t in octeon driver

drivers/staging/octeon/ethernet.c | 6 ++--
drivers/staging/octeon/octeon-stubs.h | 48 +++++++++++++--------------
2 files changed, 27 insertions(+), 27 deletions(-)

--
2.40.1


2023-10-21 10:16:19

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 2/7] staging: octeon: Fix up introduction of new typedef cvmx_helper_interface_mode_t in octeon

This patch removes the typedef for the following enum
cvmx_helper_interface_mode_t and then fixes up implementations that used
it.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/ethernet.c | 2 +-
drivers/staging/octeon/octeon-stubs.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 9eee28f2940c..023b107e077a 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -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;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 9f269626b862..40c357c77679 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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,7 +1265,7 @@ 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
+static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int
interface)
{
return 0;
--
2.40.1

2023-10-21 10:16:27

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 1/7] staging: octeon: Fix introduction of new enum typedef cvmx_spi_mode_t in octeon

This patch removes the introduction of the following new enum typedef
cvmx_spi_mode_t and fixes up where implementations which used it.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/octeon-stubs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 3e7b92cd2e35..9f269626b862 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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;
}
--
2.40.1

2023-10-21 10:16:29

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 5/7] staging: octeon: Fix introduction of new typedef cvmx_pko_status_t in octeon

This patch removes the introduction of a new enum typedef cvmx_pko_status_t
in the octeon driver and then fix implementations which used it.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/octeon-stubs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 6c0196c1a9f6..529a75ad7c67 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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)
{
--
2.40.1

2023-10-21 10:16:29

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 3/7] staging: octeon: Fix introduction of following new typedef cvmx_pow_wait_t in octeon

This patch removes the introduction of the following new enum typedef
cvmx_pow_wait_t and fixes up the implementations that used it.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/octeon-stubs.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 40c357c77679..a11cbfec4d35 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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;
}
--
2.40.1

2023-10-21 10:16:31

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 7/7] staging: octeon: Fix introduction of new typedef cvmx_pko_port_status_t in octeon driver

This patch removes the introduction of a new struct typedef
cvmx_pko_port_status_t in the octeon driver and then fixes the
implementations which used it.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/ethernet.c | 2 +-
drivers/staging/octeon/octeon-stubs.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 8c48acab49e4..8e1f4b987a25 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -202,7 +202,7 @@ EXPORT_SYMBOL(cvm_oct_free_work);
static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
{
struct cvmx_pip_port_status rx_status;
- cvmx_pko_port_status_t tx_status;
+ struct cvmx_pko_port_status tx_status;
struct octeon_ethernet *priv = netdev_priv(dev);

if (priv->port < CVMX_PIP_NUM_INPUT_PORTS) {
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 33a0e1d5f961..cf7f77061eb9 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -409,11 +409,11 @@ struct cvmx_pip_port_status {
uint16_t inb_errors;
};

-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;
@@ -1262,7 +1262,7 @@ static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t clear,
{ }

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
--
2.40.1

2023-10-21 10:17:00

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 6/7] staging: octeon: Fix introduction of new typedef cvmx_pip_port_status_t in octeon

This patch removes the introduction of a new struct typedef
cvmx_pip_port_status_t in the octeon driver and then fixes instances
where it was used.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/ethernet.c | 2 +-
drivers/staging/octeon/octeon-stubs.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 023b107e077a..8c48acab49e4 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -201,7 +201,7 @@ 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;
+ struct cvmx_pip_port_status rx_status;
cvmx_pko_port_status_t tx_status;
struct octeon_ethernet *priv = netdev_priv(dev);

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 529a75ad7c67..33a0e1d5f961 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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,7 +407,7 @@ typedef struct {
uint32_t inb_packets;
uint64_t inb_octets;
uint16_t inb_errors;
-} cvmx_pip_port_status_t;
+};

typedef struct {
uint32_t packets;
@@ -1258,7 +1258,7 @@ 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,
--
2.40.1

2023-10-21 10:17:13

by Jonathan Bergh

[permalink] [raw]
Subject: [PATCH v3 4/7] staging: octeon: Fix up introduction of new typedef cvmx_pko_lock_t in octeon

This patch removes the new enum typedef cvmx_pko_lock_t and then fixes
implementations that used it.

Signed-off-by: Jonathan Bergh <[email protected]>
---
Changelog:
v1 -> v2: Fix breaking change spread across multiple patches
v2 -> v3: Break changes up into individual patches for each removed
typedef

drivers/staging/octeon/octeon-stubs.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index a11cbfec4d35..6c0196c1a9f6 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -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;
}
--
2.40.1

2023-10-21 20:54:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] staging: octeon: Fix warnings due to introduction of new typedefs

On Sat, Oct 21, 2023 at 12:12:31PM +0200, Jonathan Bergh wrote:
> This patch series fixes (removes) the introduction of several new typedefs
> for enums and structs in the octeon driver. First the declarations are
> fixed and then implementations are updated to remove references to the
> old typedefs.
>
> Changelog:
> * v1 -> v2: Fix breaking change spread across multiple patches
> * v2 -> v3: Break changes up into individual patches for each removed
> typedef


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did not apply to any known trees that Greg is in control
of. Possibly this is because you made it against Linus's tree, not
the linux-next tree, which is where all of the development for the
next version of the kernel is at. Please refresh your patch against
the linux-next tree, or even better yet, the development tree
specified in the MAINTAINERS file for the subsystem you are submitting
a patch for, and resend it.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

2023-10-23 14:43:42

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] staging: octeon: Fix warnings due to introduction of new typedefs

On Sat, Oct 21, 2023 at 12:12:31PM +0200, Jonathan Bergh wrote:
> This patch series fixes (removes) the introduction of several new typedefs
> for enums and structs in the octeon driver. First the declarations are
> fixed and then implementations are updated to remove references to the
> old typedefs.
>
> Changelog:
> * v1 -> v2: Fix breaking change spread across multiple patches
> * v2 -> v3: Break changes up into individual patches for each removed
> typedef
>
> Jonathan Bergh (7):
> staging: octeon: Fix introduction of new enum typedef cvmx_spi_mode_t
> in octeon
> staging: octeon: Fix up introduction of new typedef
> cvmx_helper_interface_mode_t in octeon
> staging: octeon: Fix introduction of following new typedef
> cvmx_pow_wait_t in octeon
> staging: octeon: Fix up introduction of new typedef cvmx_pko_lock_t in
> octeon
> staging: octeon: Fix introduction of new typedef cvmx_pko_status_t in
> octeon
> staging: octeon: Fix introduction of new typedef
> cvmx_pip_port_status_t in octeon
> staging: octeon: Fix introduction of new typedef
> cvmx_pko_port_status_t in octeon driver
>
> drivers/staging/octeon/ethernet.c | 6 ++--
> drivers/staging/octeon/octeon-stubs.h | 48 +++++++++++++--------------

Please don't change the stubs without change the arch/ code.

regards,
dan carpenter

2023-10-26 20:02:45

by Jonathan Bergh

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] staging: octeon: Fix warnings due to introduction of new typedefs

On Mon, Oct 23, 2023 at 05:41:38PM +0300, Dan Carpenter wrote:
> On Sat, Oct 21, 2023 at 12:12:31PM +0200, Jonathan Bergh wrote:
> > This patch series fixes (removes) the introduction of several new typedefs
> > for enums and structs in the octeon driver. First the declarations are
> > fixed and then implementations are updated to remove references to the
> > old typedefs.
> >
> > Changelog:
> > * v1 -> v2: Fix breaking change spread across multiple patches
> > * v2 -> v3: Break changes up into individual patches for each removed
> > typedef
> >
> > Jonathan Bergh (7):
> > staging: octeon: Fix introduction of new enum typedef cvmx_spi_mode_t
> > in octeon
> > staging: octeon: Fix up introduction of new typedef
> > cvmx_helper_interface_mode_t in octeon
> > staging: octeon: Fix introduction of following new typedef
> > cvmx_pow_wait_t in octeon
> > staging: octeon: Fix up introduction of new typedef cvmx_pko_lock_t in
> > octeon
> > staging: octeon: Fix introduction of new typedef cvmx_pko_status_t in
> > octeon
> > staging: octeon: Fix introduction of new typedef
> > cvmx_pip_port_status_t in octeon
> > staging: octeon: Fix introduction of new typedef
> > cvmx_pko_port_status_t in octeon driver
> >
> > drivers/staging/octeon/ethernet.c | 6 ++--
> > drivers/staging/octeon/octeon-stubs.h | 48 +++++++++++++--------------

Hi

> Please don't change the stubs without change the arch/ code.

My tree was out of date, so these changes had already actually been applied
by basically the same patches (ie removing these typedefs) around 17/09
(Sep).

> regards,
> dan carpenter
>