staging: octeon: Remove port status typedefs
PATCH v2 1/1 staging: octeon: Remove port status typedefs
Remove cvmx_pip_port_status_t and cvmx_pko_port_status_t typedefs.
Replace them with struct cvmx_pip_port_status and struct cvmx_pko_port_status
to match Linux kernel coding style.
--- drivers/staging/octeon/ethernet.c | 4 ++-- drivers/staging/octeon/octeon-stubs.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-)
drivers/staging/octeon/ethernet.c +2 -2
@@ -201,8 +201,8 @@ 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; -cvmx_pko_port_status_t tx_status; +struct cvmx_pip_port_status rx_status; +struct cvmx_pko_port_status tx_status;struct octeon_ethernet *priv =netdev_priv (dev);if (priv->port <CVMX_PIP_NUM_INPUT_PORTS ) {
drivers/staging/octeon/octeon-stubs.h +8 -7
@@ -386,7 +386,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;
@@ -409,13 +409,13 @@ typedef struct {uint32_t inb_packets;uint64_t inb_octets;uint16_t inb_errors; -} cvmx_pip_port_status_t; +}; -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;
@@ -1260,11 +1260,12 @@ 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, -cvmx_pko_port_status_t *status) +static inline void cvmx_pko_get_port_status (uint64_t port_num, +uint64_t clear, +struct cvmx_pko_port_status *status) { } static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int
Signature · 1 line
2.43.0
Greg KH
maintainerQuoted 77 lines · Karthikey Kadati
Remove
cvmx_pip_port_status_tandcvmx_pko_port_status_ttypedefs.Replace them with struct
cvmx_pip_port_statusand structcvmx_pko_port_statusto match Linux kernel coding style.
Signed-off-by Karthikey Kadati <[email protected]>--- drivers/staging/octeon/ethernet.c | 4 ++-- drivers/staging/octeon/octeon-stubs.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-)drivers/staging/octeon/ethernet.c +2
-2@@ -201,8 +201,8 @@ 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; -cvmx_pko_port_status_t tx_status; +struct cvmx_pip_port_status rx_status; +struct cvmx_pko_port_status tx_status;struct octeon_ethernet *priv =netdev_priv (dev);if (priv->port <CVMX_PIP_NUM_INPUT_PORTS ) {drivers/staging/octeon/octeon-stubs.h +8
-7@@ -386,7 +386,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;@@ -409,13 +409,13 @@ typedef struct {uint32_t inb_packets;uint64_t inb_octets;uint16_t inb_errors; -} cvmx_pip_port_status_t; +}; -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;@@ -1260,11 +1260,12 @@ 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, -cvmx_pko_port_status_t *status) +static inline void cvmx_pko_get_port_status (uint64_t port_num, +uint64_t clear, +struct cvmx_pko_port_status *status) { } static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(intSignature · 1 line
2.43.0
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:
- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this.
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
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Karthikey,
kernel test robot noticed the following build warnings:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Karthikey-Kadati/staging-octeon-Remove-port-status-typedefs/20260112-184331 base: staging/staging-testing patch link: https://lore.kernel.org/r/20260112103843.22925-1-karthikey3608%40gmail.com patch subject: [PATCH v2] staging: octeon: Remove port status typedefs config: mips-cavium_octeon_defconfig (https://download.01.org/0day-ci/archive/20260113/[email protected]/config) compiler: mips64-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260113/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
>> drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable]
>> drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~vim +/tx_status +205 drivers/staging/octeon/ethernet.c
195
196 /**
197 * cvm_oct_common_get_stats - get the low level ethernet statistics
198 * @dev: Device to get the statistics from
199 *
200 * Returns Pointer to the statistics
201 */
202 static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
203 {
> 204 struct cvmx_pip_port_status rx_status; > 205 struct cvmx_pko_port_status tx_status;
206 struct octeon_ethernet *priv = netdev_priv(dev);
207
208 if (priv->port < CVMX_PIP_NUM_INPUT_PORTS) {
209 if (octeon_is_simulation()) {
210 /* The simulator doesn't support statistics */
211 memset(&rx_status, 0, sizeof(rx_status));
212 memset(&tx_status, 0, sizeof(tx_status));
213 } else {
214 cvmx_pip_get_port_status(priv->port, 1, &rx_status);
215 cvmx_pko_get_port_status(priv->port, 1, &tx_status);
216 }
217
218 dev->stats.rx_packets += rx_status.inb_packets;
219 dev->stats.tx_packets += tx_status.packets;
220 dev->stats.rx_bytes += rx_status.inb_octets;
221 dev->stats.tx_bytes += tx_status.octets;
222 dev->stats.multicast += rx_status.multicast_packets;
223 dev->stats.rx_crc_errors += rx_status.inb_errors;
224 dev->stats.rx_frame_errors += rx_status.fcs_align_err_packets;
225 dev->stats.rx_dropped += rx_status.dropped_packets;
226 }
227
228 return &dev->stats;
229 }
230
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Karthikey,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Karthikey-Kadati/staging-octeon-Remove-port-status-typedefs/20260112-184331 base: staging/staging-testing patch link: https://lore.kernel.org/r/20260112103843.22925-1-karthikey3608%40gmail.com patch subject: [PATCH v2] staging: octeon: Remove port status typedefs config: mips-cavium_octeon_defconfig (https://download.01.org/0day-ci/archive/20260113/[email protected]/config) compiler: mips64-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260113/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
>> drivers/staging/octeon/ethernet.c:204:37: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~
>> drivers/staging/octeon/ethernet.c:205:37: error: storage size of 'tx_status' isn't known
205 | struct cvmx_pko_port_status tx_status;
| ^~~~~~~~~
drivers/staging/octeon/ethernet.c:205:37: warning: unused variable 'tx_status' [-Wunused-variable]
drivers/staging/octeon/ethernet.c:204:37: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status rx_status;
| ^~~~~~~~~vim +204 drivers/staging/octeon/ethernet.c
195
196 /**
197 * cvm_oct_common_get_stats - get the low level ethernet statistics
198 * @dev: Device to get the statistics from
199 *
200 * Returns Pointer to the statistics
201 */
202 static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
203 {
> 204 struct cvmx_pip_port_status rx_status; > 205 struct cvmx_pko_port_status tx_status;
206 struct octeon_ethernet *priv = netdev_priv(dev);
207
208 if (priv->port < CVMX_PIP_NUM_INPUT_PORTS) {
209 if (octeon_is_simulation()) {
210 /* The simulator doesn't support statistics */
211 memset(&rx_status, 0, sizeof(rx_status));
212 memset(&tx_status, 0, sizeof(tx_status));
213 } else {
214 cvmx_pip_get_port_status(priv->port, 1, &rx_status);
215 cvmx_pko_get_port_status(priv->port, 1, &tx_status);
216 }
217
218 dev->stats.rx_packets += rx_status.inb_packets;
219 dev->stats.tx_packets += tx_status.packets;
220 dev->stats.rx_bytes += rx_status.inb_octets;
221 dev->stats.tx_bytes += tx_status.octets;
222 dev->stats.multicast += rx_status.multicast_packets;
223 dev->stats.rx_crc_errors += rx_status.inb_errors;
224 dev->stats.rx_frame_errors += rx_status.fcs_align_err_packets;
225 dev->stats.rx_dropped += rx_status.dropped_packets;
226 }
227
228 return &dev->stats;
229 }
230
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki