* [PATCH v3 1/6] staging: octeon: clean up the octeon ethernet driver
[not found] <cover.1693180346.git.ozlinux@hotmail.com>
@ 2023-08-27 23:58 ` Oliver Crumrine
2023-09-05 9:41 ` Dan Carpenter
2023-08-27 23:58 ` [PATCH v3 2/6] " Oliver Crumrine
` (4 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Oliver Crumrine @ 2023-08-27 23:58 UTC (permalink / raw)
To: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert
Cc: Oliver Crumrine, linux-kernel, linux-staging
Make the octeon ethernet driver better adhere to the
kernel coding standard.
Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
---
v2: Actually send the patch set properly
v3: Fixed a problem where I forgot to rename all instances of a struct
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.39.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/6] staging: octeon: clean up the octeon ethernet driver
2023-08-27 23:58 ` [PATCH v3 1/6] staging: octeon: clean up the octeon ethernet driver Oliver Crumrine
@ 2023-09-05 9:41 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2023-09-05 9:41 UTC (permalink / raw)
To: Oliver Crumrine
Cc: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert,
linux-kernel, linux-staging
On Sun, Aug 27, 2023 at 07:58:17PM -0400, Oliver Crumrine wrote:
> Make the octeon ethernet driver better adhere to the
> kernel coding standard.
This is way way way too vague. It should be something like:
Checkpatch complains about "quoted text". Remove the typedef and use
the raw enum instead.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 2/6] staging: octeon: clean up the octeon ethernet driver
[not found] <cover.1693180346.git.ozlinux@hotmail.com>
2023-08-27 23:58 ` [PATCH v3 1/6] staging: octeon: clean up the octeon ethernet driver Oliver Crumrine
@ 2023-08-27 23:58 ` Oliver Crumrine
2023-08-27 23:58 ` [PATCH v3 3/6] " Oliver Crumrine
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Oliver Crumrine @ 2023-08-27 23:58 UTC (permalink / raw)
To: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert
Cc: Oliver Crumrine, linux-kernel, linux-staging
Make the octeon ethernet driver better adhere to the
kernel coding standard
Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
---
v2: Actually send the patch set properly
v3: Fixed a problem where I forgot to rename all instances of a struct
drivers/staging/octeon/ethernet.c | 2 +-
drivers/staging/octeon/octeon-stubs.h | 8 ++++----
2 files changed, 5 insertions(+), 5 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..0b0c609a771c 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,8 +1265,8 @@ 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
- interface)
+static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int
+ interface)
{
return 0;
}
--
2.39.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/6] staging: octeon: clean up the octeon ethernet driver
[not found] <cover.1693180346.git.ozlinux@hotmail.com>
2023-08-27 23:58 ` [PATCH v3 1/6] staging: octeon: clean up the octeon ethernet driver Oliver Crumrine
2023-08-27 23:58 ` [PATCH v3 2/6] " Oliver Crumrine
@ 2023-08-27 23:58 ` Oliver Crumrine
2023-08-27 23:58 ` [PATCH v3 4/6] " Oliver Crumrine
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Oliver Crumrine @ 2023-08-27 23:58 UTC (permalink / raw)
To: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert
Cc: Oliver Crumrine, linux-kernel, linux-staging
Make the octeon ethernet driver better adhere to the
kernel coding standard
Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
---
v2: Actually send the patch set properly
v3: Fixed a problem where I forgot to rename all instances of a struct
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 0b0c609a771c..4470c985dc5d 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.39.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 4/6] staging: octeon: clean up the octeon ethernet driver
[not found] <cover.1693180346.git.ozlinux@hotmail.com>
` (2 preceding siblings ...)
2023-08-27 23:58 ` [PATCH v3 3/6] " Oliver Crumrine
@ 2023-08-27 23:58 ` Oliver Crumrine
2023-08-27 23:58 ` [PATCH v3 5/6] " Oliver Crumrine
2023-08-27 23:58 ` [PATCH v3 6/6] " Oliver Crumrine
5 siblings, 0 replies; 9+ messages in thread
From: Oliver Crumrine @ 2023-08-27 23:58 UTC (permalink / raw)
To: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert
Cc: Oliver Crumrine, linux-kernel, linux-staging
Make the octeon ethernet driver better adhere to the
kernel coding standard
Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
---
v2: Actually send the patch set properly
v3: Fixed a problem where I forgot to rename all instances of a struct
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 4470c985dc5d..2cdbcbd8a97b 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.39.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 5/6] staging: octeon: clean up the octeon ethernet driver
[not found] <cover.1693180346.git.ozlinux@hotmail.com>
` (3 preceding siblings ...)
2023-08-27 23:58 ` [PATCH v3 4/6] " Oliver Crumrine
@ 2023-08-27 23:58 ` Oliver Crumrine
2023-08-27 23:58 ` [PATCH v3 6/6] " Oliver Crumrine
5 siblings, 0 replies; 9+ messages in thread
From: Oliver Crumrine @ 2023-08-27 23:58 UTC (permalink / raw)
To: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert
Cc: Oliver Crumrine, linux-kernel, linux-staging
Make the octeon ethernet driver better adhere to the
kernel coding standard
Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
---
v2: Actually send the patch set properly
v3: Fixed a problem where I forgot to rename all instances of a struct
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 2cdbcbd8a97b..b9852994882b 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.39.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 6/6] staging: octeon: clean up the octeon ethernet driver
[not found] <cover.1693180346.git.ozlinux@hotmail.com>
` (4 preceding siblings ...)
2023-08-27 23:58 ` [PATCH v3 5/6] " Oliver Crumrine
@ 2023-08-27 23:58 ` Oliver Crumrine
2023-08-28 2:48 ` kernel test robot
2023-08-28 5:19 ` kernel test robot
5 siblings, 2 replies; 9+ messages in thread
From: Oliver Crumrine @ 2023-08-27 23:58 UTC (permalink / raw)
To: gregkh, colin.i.king, sumitraartsy, u.kleine-koenig, geert
Cc: Oliver Crumrine, linux-kernel, linux-staging
Make the octeon ethernet driver better adhere to the
kernel coding standard
Signed-off-by: Oliver Crumrine <ozlinux@hotmail.com>
---
v2: Actually send the patch set properly
v3: Fixed a problem where I forgot to rename all instances of a struct
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..f01cdfa3275a 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_t 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 b9852994882b..8befdcee6ee9 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.39.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 6/6] staging: octeon: clean up the octeon ethernet driver
2023-08-27 23:58 ` [PATCH v3 6/6] " Oliver Crumrine
@ 2023-08-28 2:48 ` kernel test robot
2023-08-28 5:19 ` kernel test robot
1 sibling, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-08-28 2:48 UTC (permalink / raw)
To: Oliver Crumrine, gregkh, colin.i.king, sumitraartsy,
u.kleine-koenig, geert
Cc: oe-kbuild-all, Oliver Crumrine, linux-kernel, linux-staging
Hi Oliver,
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/Oliver-Crumrine/staging-octeon-clean-up-the-octeon-ethernet-driver/20230828-080105
base: staging/staging-testing
patch link: https://lore.kernel.org/r/PH7PR11MB764329EC8CFB56ABFA7A8D77BCE1A%40PH7PR11MB7643.namprd11.prod.outlook.com
patch subject: [PATCH v3 6/6] staging: octeon: clean up the octeon ethernet driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230828/202308281043.2o6mVbgk-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308281043.2o6mVbgk-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308281043.2o6mVbgk-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
drivers/staging/octeon/ethernet.c:204:39: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status_t rx_status;
| ^~~~~~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/paravirt.h:17,
from arch/x86/include/asm/irqflags.h:60,
from include/linux/irqflags.h:17,
from include/linux/rcupdate.h:26,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/staging/octeon/ethernet.c:8:
>> include/linux/fortify-string.h:515:65: warning: left-hand operand of comma expression has no effect [-Wunused-value]
515 | fortify_memset_chk(__fortify_size, p_size, p_size_field), \
| ^
include/linux/fortify-string.h:524:25: note: in expansion of macro '__fortify_memset_chk'
524 | #define memset(p, c, s) __fortify_memset_chk(p, c, s, \
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/octeon/ethernet.c:211:25: note: in expansion of macro 'memset'
211 | memset(&rx_status, 0, sizeof(rx_status));
| ^~~~~~
>> drivers/staging/octeon/ethernet.c:204:39: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status_t rx_status;
| ^~~~~~~~~
vim +/rx_status +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_t rx_status;
205 cvmx_pko_port_status_t 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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 6/6] staging: octeon: clean up the octeon ethernet driver
2023-08-27 23:58 ` [PATCH v3 6/6] " Oliver Crumrine
2023-08-28 2:48 ` kernel test robot
@ 2023-08-28 5:19 ` kernel test robot
1 sibling, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-08-28 5:19 UTC (permalink / raw)
To: Oliver Crumrine, gregkh, colin.i.king, sumitraartsy,
u.kleine-koenig, geert
Cc: oe-kbuild-all, Oliver Crumrine, linux-kernel, linux-staging
Hi Oliver,
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/Oliver-Crumrine/staging-octeon-clean-up-the-octeon-ethernet-driver/20230828-080105
base: staging/staging-testing
patch link: https://lore.kernel.org/r/PH7PR11MB764329EC8CFB56ABFA7A8D77BCE1A%40PH7PR11MB7643.namprd11.prod.outlook.com
patch subject: [PATCH v3 6/6] staging: octeon: clean up the octeon ethernet driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230828/202308281356.A52cXVbt-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308281356.A52cXVbt-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308281356.A52cXVbt-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_get_stats':
>> drivers/staging/octeon/ethernet.c:204:39: error: storage size of 'rx_status' isn't known
204 | struct cvmx_pip_port_status_t rx_status;
| ^~~~~~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/paravirt.h:17,
from arch/x86/include/asm/irqflags.h:60,
from include/linux/irqflags.h:17,
from include/linux/rcupdate.h:26,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/staging/octeon/ethernet.c:8:
include/linux/fortify-string.h:515:65: warning: left-hand operand of comma expression has no effect [-Wunused-value]
515 | fortify_memset_chk(__fortify_size, p_size, p_size_field), \
| ^
include/linux/fortify-string.h:524:25: note: in expansion of macro '__fortify_memset_chk'
524 | #define memset(p, c, s) __fortify_memset_chk(p, c, s, \
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/octeon/ethernet.c:211:25: note: in expansion of macro 'memset'
211 | memset(&rx_status, 0, sizeof(rx_status));
| ^~~~~~
drivers/staging/octeon/ethernet.c:204:39: warning: unused variable 'rx_status' [-Wunused-variable]
204 | struct cvmx_pip_port_status_t 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_t rx_status;
205 cvmx_pko_port_status_t 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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread