[PATCH] staging: octeon: Fix unused macro Argument 'x'

nancyenos posted 1 patch 10 months, 3 weeks ago
There is a newer version of this series
drivers/staging/octeon/octeon-stubs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] staging: octeon: Fix unused macro Argument 'x'
Posted by nancyenos 10 months, 3 weeks ago
warning found by checkpath.pl

Signed-off-by: nancyenos <nicymimz@gmail.com>
---
 drivers/staging/octeon/octeon-stubs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 44cced319c11..0155f3c41657 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -8,8 +8,8 @@
 #define OCTEON_IRQ_WORKQ0 0
 #define OCTEON_IRQ_RML 0
 #define OCTEON_IRQ_TIMER1 0
-#define OCTEON_IS_MODEL(x) 0
-#define octeon_has_feature(x)	0
+#define OCTEON_IS_MODEL(x) ((void)(x), 0)
+#define octeon_has_feature(x) ((void)(x), 0)
 #define octeon_get_clock_rate()	0
 
 #define CVMX_SYNCIOBDMA		do { } while (0)
-- 
2.25.1
Re: [PATCH] staging: octeon: Fix unused macro Argument 'x'
Posted by kernel test robot 10 months, 3 weeks ago
Hi nancyenos,

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/nancyenos/staging-octeon-Fix-unused-macro-Argument-x/20250322-084136
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20250322003218.14134-1-nicymimz%40gmail.com
patch subject: [PATCH] staging: octeon: Fix unused macro Argument 'x'
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250323/202503231053.WFt2cPIR-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/202503231053.WFt2cPIR-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/202503231053.WFt2cPIR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/staging/octeon/ethernet.c:258:23: error: use of undeclared identifier 'OCTEON_CN3XXX'
     258 |                 if (OCTEON_IS_MODEL(OCTEON_CN3XXX) ||
         |                                     ^
>> drivers/staging/octeon/ethernet.c:259:23: error: use of undeclared identifier 'OCTEON_CN58XX'
     259 |                     OCTEON_IS_MODEL(OCTEON_CN58XX)) {
         |                                     ^
>> drivers/staging/octeon/ethernet.c:469:25: error: use of undeclared identifier 'OCTEON_FEATURE_PKND'
     469 |         if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                                ^
>> drivers/staging/octeon/ethernet.c:725:25: error: use of undeclared identifier 'OCTEON_CN68XX'
     725 |                                 if (OCTEON_IS_MODEL(OCTEON_CN68XX))
         |                                                     ^
   4 errors generated.
--
>> drivers/staging/octeon/ethernet-rx.c:67:25: error: use of undeclared identifier 'OCTEON_FEATURE_PKND'
      67 |         if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                                ^
>> drivers/staging/octeon/ethernet-rx.c:201:22: error: use of undeclared identifier 'OCTEON_CN68XX'
     201 |         if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |                             ^
   drivers/staging/octeon/ethernet-rx.c:233:24: error: use of undeclared identifier 'OCTEON_CN68XX'
     233 |                         if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |                                             ^
   drivers/staging/octeon/ethernet-rx.c:267:26: error: use of undeclared identifier 'OCTEON_FEATURE_PKND'
     267 |                 if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                                        ^
   drivers/staging/octeon/ethernet-rx.c:389:22: error: use of undeclared identifier 'OCTEON_CN68XX'
     389 |         if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |                             ^
   drivers/staging/octeon/ethernet-rx.c:489:23: error: use of undeclared identifier 'OCTEON_CN68XX'
     489 |                 if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |                                     ^
   drivers/staging/octeon/ethernet-rx.c:532:23: error: use of undeclared identifier 'OCTEON_CN68XX'
     532 |                 if (OCTEON_IS_MODEL(OCTEON_CN68XX))
         |                                     ^
   7 errors generated.
--
>> drivers/staging/octeon/ethernet-tx.c:227:41: error: use of undeclared identifier 'OCTEON_CN3XXX'
     227 |         if ((skb->len < 64) && OCTEON_IS_MODEL(OCTEON_CN3XXX)) {
         |                                                ^
>> drivers/staging/octeon/ethernet-tx.c:558:23: error: use of undeclared identifier 'OCTEON_CN68XX'
     558 |         if (!OCTEON_IS_MODEL(OCTEON_CN68XX))
         |                              ^
   2 errors generated.


vim +/OCTEON_CN3XXX +258 drivers/staging/octeon/ethernet.c

422d97b8b05ed3 Chris Packham 2020-02-05  230  
422d97b8b05ed3 Chris Packham 2020-02-05  231  /**
422d97b8b05ed3 Chris Packham 2020-02-05  232   * cvm_oct_common_change_mtu - change the link MTU
422d97b8b05ed3 Chris Packham 2020-02-05  233   * @dev:     Device to change
422d97b8b05ed3 Chris Packham 2020-02-05  234   * @new_mtu: The new MTU
422d97b8b05ed3 Chris Packham 2020-02-05  235   *
422d97b8b05ed3 Chris Packham 2020-02-05  236   * Returns Zero on success
422d97b8b05ed3 Chris Packham 2020-02-05  237   */
422d97b8b05ed3 Chris Packham 2020-02-05  238  static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
422d97b8b05ed3 Chris Packham 2020-02-05  239  {
422d97b8b05ed3 Chris Packham 2020-02-05  240  	struct octeon_ethernet *priv = netdev_priv(dev);
422d97b8b05ed3 Chris Packham 2020-02-05  241  	int interface = INTERFACE(priv->port);
422d97b8b05ed3 Chris Packham 2020-02-05  242  #if IS_ENABLED(CONFIG_VLAN_8021Q)
422d97b8b05ed3 Chris Packham 2020-02-05  243  	int vlan_bytes = VLAN_HLEN;
422d97b8b05ed3 Chris Packham 2020-02-05  244  #else
422d97b8b05ed3 Chris Packham 2020-02-05  245  	int vlan_bytes = 0;
422d97b8b05ed3 Chris Packham 2020-02-05  246  #endif
422d97b8b05ed3 Chris Packham 2020-02-05  247  	int mtu_overhead = ETH_HLEN + ETH_FCS_LEN + vlan_bytes;
422d97b8b05ed3 Chris Packham 2020-02-05  248  
422d97b8b05ed3 Chris Packham 2020-02-05  249  	dev->mtu = new_mtu;
422d97b8b05ed3 Chris Packham 2020-02-05  250  
422d97b8b05ed3 Chris Packham 2020-02-05  251  	if ((interface < 2) &&
422d97b8b05ed3 Chris Packham 2020-02-05  252  	    (cvmx_helper_interface_get_mode(interface) !=
422d97b8b05ed3 Chris Packham 2020-02-05  253  		CVMX_HELPER_INTERFACE_MODE_SPI)) {
422d97b8b05ed3 Chris Packham 2020-02-05  254  		int index = INDEX(priv->port);
422d97b8b05ed3 Chris Packham 2020-02-05  255  		/* Add ethernet header and FCS, and VLAN if configured. */
422d97b8b05ed3 Chris Packham 2020-02-05  256  		int max_packet = new_mtu + mtu_overhead;
422d97b8b05ed3 Chris Packham 2020-02-05  257  
422d97b8b05ed3 Chris Packham 2020-02-05 @258  		if (OCTEON_IS_MODEL(OCTEON_CN3XXX) ||
422d97b8b05ed3 Chris Packham 2020-02-05 @259  		    OCTEON_IS_MODEL(OCTEON_CN58XX)) {
422d97b8b05ed3 Chris Packham 2020-02-05  260  			/* Signal errors on packets larger than the MTU */
422d97b8b05ed3 Chris Packham 2020-02-05  261  			cvmx_write_csr(CVMX_GMXX_RXX_FRM_MAX(index, interface),
422d97b8b05ed3 Chris Packham 2020-02-05  262  				       max_packet);
422d97b8b05ed3 Chris Packham 2020-02-05  263  		} else {
422d97b8b05ed3 Chris Packham 2020-02-05  264  			/*
422d97b8b05ed3 Chris Packham 2020-02-05  265  			 * Set the hardware to truncate packets larger
422d97b8b05ed3 Chris Packham 2020-02-05  266  			 * than the MTU and smaller the 64 bytes.
422d97b8b05ed3 Chris Packham 2020-02-05  267  			 */
422d97b8b05ed3 Chris Packham 2020-02-05  268  			union cvmx_pip_frm_len_chkx frm_len_chk;
422d97b8b05ed3 Chris Packham 2020-02-05  269  
422d97b8b05ed3 Chris Packham 2020-02-05  270  			frm_len_chk.u64 = 0;
422d97b8b05ed3 Chris Packham 2020-02-05  271  			frm_len_chk.s.minlen = VLAN_ETH_ZLEN;
422d97b8b05ed3 Chris Packham 2020-02-05  272  			frm_len_chk.s.maxlen = max_packet;
422d97b8b05ed3 Chris Packham 2020-02-05  273  			cvmx_write_csr(CVMX_PIP_FRM_LEN_CHKX(interface),
422d97b8b05ed3 Chris Packham 2020-02-05  274  				       frm_len_chk.u64);
422d97b8b05ed3 Chris Packham 2020-02-05  275  		}
422d97b8b05ed3 Chris Packham 2020-02-05  276  		/*
422d97b8b05ed3 Chris Packham 2020-02-05  277  		 * Set the hardware to truncate packets larger than
422d97b8b05ed3 Chris Packham 2020-02-05  278  		 * the MTU. The jabber register must be set to a
422d97b8b05ed3 Chris Packham 2020-02-05  279  		 * multiple of 8 bytes, so round up.
422d97b8b05ed3 Chris Packham 2020-02-05  280  		 */
422d97b8b05ed3 Chris Packham 2020-02-05  281  		cvmx_write_csr(CVMX_GMXX_RXX_JABBER(index, interface),
422d97b8b05ed3 Chris Packham 2020-02-05  282  			       (max_packet + 7) & ~7u);
422d97b8b05ed3 Chris Packham 2020-02-05  283  	}
422d97b8b05ed3 Chris Packham 2020-02-05  284  	return 0;
422d97b8b05ed3 Chris Packham 2020-02-05  285  }
422d97b8b05ed3 Chris Packham 2020-02-05  286  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] staging: octeon: Fix unused macro Argument 'x'
Posted by kernel test robot 10 months, 3 weeks ago
Hi nancyenos,

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/nancyenos/staging-octeon-Fix-unused-macro-Argument-x/20250322-084136
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20250322003218.14134-1-nicymimz%40gmail.com
patch subject: [PATCH] staging: octeon: Fix unused macro Argument 'x'
config: arc-randconfig-001-20250322 (https://download.01.org/0day-ci/archive/20250322/202503221402.gmXKIBsx-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250322/202503221402.gmXKIBsx-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/202503221402.gmXKIBsx-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from drivers/staging/octeon/octeon-ethernet.h:41,
                    from drivers/staging/octeon/ethernet-rx.c:26:
   drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_check_rcv_error':
>> drivers/staging/octeon/ethernet-rx.c:67:25: error: 'OCTEON_FEATURE_PKND' undeclared (first use in this function)
      67 |  if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                         ^~~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:12:39: note: in definition of macro 'octeon_has_feature'
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                       ^
   drivers/staging/octeon/ethernet-rx.c:67:25: note: each undeclared identifier is reported only once for each function it appears in
      67 |  if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                         ^~~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:12:39: note: in definition of macro 'octeon_has_feature'
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                       ^
>> drivers/staging/octeon/octeon-stubs.h:12:41: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                         ^
   drivers/staging/octeon/ethernet-rx.c:67:6: note: in expansion of macro 'octeon_has_feature'
      67 |  if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |      ^~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_poll':
>> drivers/staging/octeon/ethernet-rx.c:201:22: error: 'OCTEON_CN68XX' undeclared (first use in this function)
     201 |  if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |                      ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-rx.c:201:6: note: in expansion of macro 'OCTEON_IS_MODEL'
     201 |  if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |      ^~~~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-rx.c:233:8: note: in expansion of macro 'OCTEON_IS_MODEL'
     233 |    if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |        ^~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet-rx.c:267:26: error: 'OCTEON_FEATURE_PKND' undeclared (first use in this function)
     267 |   if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                          ^~~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:12:39: note: in definition of macro 'octeon_has_feature'
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                       ^
>> drivers/staging/octeon/octeon-stubs.h:12:41: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                         ^
   drivers/staging/octeon/ethernet-rx.c:267:7: note: in expansion of macro 'octeon_has_feature'
     267 |   if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |       ^~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-rx.c:389:6: note: in expansion of macro 'OCTEON_IS_MODEL'
     389 |  if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |      ^~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_rx_initialize':
   drivers/staging/octeon/ethernet-rx.c:489:23: error: 'OCTEON_CN68XX' undeclared (first use in this function)
     489 |   if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |                       ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-rx.c:489:7: note: in expansion of macro 'OCTEON_IS_MODEL'
     489 |   if (OCTEON_IS_MODEL(OCTEON_CN68XX)) {
         |       ^~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_rx_shutdown':
   drivers/staging/octeon/ethernet-rx.c:532:23: error: 'OCTEON_CN68XX' undeclared (first use in this function)
     532 |   if (OCTEON_IS_MODEL(OCTEON_CN68XX))
         |                       ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-rx.c:532:7: note: in expansion of macro 'OCTEON_IS_MODEL'
     532 |   if (OCTEON_IS_MODEL(OCTEON_CN68XX))
         |       ^~~~~~~~~~~~~~~
--
   In file included from drivers/staging/octeon/octeon-ethernet.h:41,
                    from drivers/staging/octeon/ethernet-tx.c:25:
   drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_xmit':
>> drivers/staging/octeon/ethernet-tx.c:227:41: error: 'OCTEON_CN3XXX' undeclared (first use in this function)
     227 |  if ((skb->len < 64) && OCTEON_IS_MODEL(OCTEON_CN3XXX)) {
         |                                         ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/ethernet-tx.c:227:41: note: each undeclared identifier is reported only once for each function it appears in
     227 |  if ((skb->len < 64) && OCTEON_IS_MODEL(OCTEON_CN3XXX)) {
         |                                         ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-tx.c:227:25: note: in expansion of macro 'OCTEON_IS_MODEL'
     227 |  if ((skb->len < 64) && OCTEON_IS_MODEL(OCTEON_CN3XXX)) {
         |                         ^~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_xmit_pow':
>> drivers/staging/octeon/ethernet-tx.c:558:23: error: 'OCTEON_CN68XX' undeclared (first use in this function)
     558 |  if (!OCTEON_IS_MODEL(OCTEON_CN68XX))
         |                       ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet-tx.c:558:7: note: in expansion of macro 'OCTEON_IS_MODEL'
     558 |  if (!OCTEON_IS_MODEL(OCTEON_CN68XX))
         |       ^~~~~~~~~~~~~~~
--
   In file included from drivers/staging/octeon/octeon-ethernet.h:41,
                    from drivers/staging/octeon/ethernet.c:23:
   drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_change_mtu':
>> drivers/staging/octeon/ethernet.c:258:23: error: 'OCTEON_CN3XXX' undeclared (first use in this function)
     258 |   if (OCTEON_IS_MODEL(OCTEON_CN3XXX) ||
         |                       ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/ethernet.c:258:23: note: each undeclared identifier is reported only once for each function it appears in
     258 |   if (OCTEON_IS_MODEL(OCTEON_CN3XXX) ||
         |                       ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet.c:258:7: note: in expansion of macro 'OCTEON_IS_MODEL'
     258 |   if (OCTEON_IS_MODEL(OCTEON_CN3XXX) ||
         |       ^~~~~~~~~~~~~~~
>> drivers/staging/octeon/ethernet.c:259:23: error: 'OCTEON_CN58XX' undeclared (first use in this function)
     259 |       OCTEON_IS_MODEL(OCTEON_CN58XX)) {
         |                       ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet.c:259:7: note: in expansion of macro 'OCTEON_IS_MODEL'
     259 |       OCTEON_IS_MODEL(OCTEON_CN58XX)) {
         |       ^~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet.c: In function 'cvm_oct_common_open':
>> drivers/staging/octeon/ethernet.c:469:25: error: 'OCTEON_FEATURE_PKND' undeclared (first use in this function)
     469 |  if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |                         ^~~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:12:39: note: in definition of macro 'octeon_has_feature'
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                       ^
>> drivers/staging/octeon/octeon-stubs.h:12:41: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      12 | #define octeon_has_feature(x) ((void)(x), 0)
         |                                         ^
   drivers/staging/octeon/ethernet.c:469:6: note: in expansion of macro 'octeon_has_feature'
     469 |  if (octeon_has_feature(OCTEON_FEATURE_PKND))
         |      ^~~~~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet.c: In function 'cvm_oct_probe':
>> drivers/staging/octeon/ethernet.c:725:25: error: 'OCTEON_CN68XX' undeclared (first use in this function)
     725 |     if (OCTEON_IS_MODEL(OCTEON_CN68XX))
         |                         ^~~~~~~~~~~~~
   drivers/staging/octeon/octeon-stubs.h:11:36: note: in definition of macro 'OCTEON_IS_MODEL'
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                    ^
   drivers/staging/octeon/octeon-stubs.h:11:38: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      11 | #define OCTEON_IS_MODEL(x) ((void)(x), 0)
         |                                      ^
   drivers/staging/octeon/ethernet.c:725:9: note: in expansion of macro 'OCTEON_IS_MODEL'
     725 |     if (OCTEON_IS_MODEL(OCTEON_CN68XX))
         |         ^~~~~~~~~~~~~~~


vim +12 drivers/staging/octeon/octeon-stubs.h

     7	
     8	#define OCTEON_IRQ_WORKQ0 0
     9	#define OCTEON_IRQ_RML 0
    10	#define OCTEON_IRQ_TIMER1 0
    11	#define OCTEON_IS_MODEL(x) ((void)(x), 0)
  > 12	#define octeon_has_feature(x) ((void)(x), 0)
    13	#define octeon_get_clock_rate()	0
    14	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki