* Re: [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver
2023-08-27 21:14 [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver Oliver Crumrine
@ 2023-08-27 23:42 ` kernel test robot
2023-08-27 23:53 ` kernel test robot
2023-08-27 23:53 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-27 23:42 UTC (permalink / raw)
To: Oliver Crumrine, gregkh, colin.i.king, sumitraartsy,
u.kleine-koenig, geert
Cc: oe-kbuild-all, 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-051802
base: staging/staging-testing
patch link: https://lore.kernel.org/r/PH7PR11MB7643F9F5DBB6781022CC4F4DBCE1A%40PH7PR11MB7643.namprd11.prod.outlook.com
patch subject: [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20230828/202308280701.II3T3JeO-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308280701.II3T3JeO-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/202308280701.II3T3JeO-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/loongarch/include/asm/processor.h:9,
from arch/loongarch/include/asm/thread_info.h:15,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/loongarch/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
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 +515 include/linux/fortify-string.h
28e77cc1c06866 Kees Cook 2021-06-16 512
28e77cc1c06866 Kees Cook 2021-06-16 513 #define __fortify_memset_chk(p, c, size, p_size, p_size_field) ({ \
28e77cc1c06866 Kees Cook 2021-06-16 514 size_t __fortify_size = (size_t)(size); \
28e77cc1c06866 Kees Cook 2021-06-16 @515 fortify_memset_chk(__fortify_size, p_size, p_size_field), \
28e77cc1c06866 Kees Cook 2021-06-16 516 __underlying_memset(p, c, __fortify_size); \
28e77cc1c06866 Kees Cook 2021-06-16 517 })
28e77cc1c06866 Kees Cook 2021-06-16 518
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver
2023-08-27 21:14 [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver Oliver Crumrine
2023-08-27 23:42 ` kernel test robot
@ 2023-08-27 23:53 ` kernel test robot
2023-08-27 23:53 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-27 23:53 UTC (permalink / raw)
To: Oliver Crumrine, gregkh, colin.i.king, sumitraartsy,
u.kleine-koenig, geert
Cc: oe-kbuild-all, 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-051802
base: staging/staging-testing
patch link: https://lore.kernel.org/r/PH7PR11MB7643F9F5DBB6781022CC4F4DBCE1A%40PH7PR11MB7643.namprd11.prod.outlook.com
patch subject: [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20230828/202308280707.qz6xetpa-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308280707.qz6xetpa-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/202308280707.qz6xetpa-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;
| ^~~~~~~~~
>> drivers/staging/octeon/ethernet.c:204:39: warning: unused variable 'rx_status' [-Wunused-variable]
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] 4+ messages in thread* Re: [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver
2023-08-27 21:14 [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver Oliver Crumrine
2023-08-27 23:42 ` kernel test robot
2023-08-27 23:53 ` kernel test robot
@ 2023-08-27 23:53 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-27 23:53 UTC (permalink / raw)
To: Oliver Crumrine, gregkh, colin.i.king, sumitraartsy,
u.kleine-koenig, geert
Cc: llvm, oe-kbuild-all, 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-051802
base: staging/staging-testing
patch link: https://lore.kernel.org/r/PH7PR11MB7643F9F5DBB6781022CC4F4DBCE1A%40PH7PR11MB7643.namprd11.prod.outlook.com
patch subject: [PATCH 6/6] staging: octeon: clean up the octeon ethernet driver
config: s390-randconfig-001-20230828 (https://download.01.org/0day-ci/archive/20230828/202308280752.Jl0Lli0C-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308280752.Jl0Lli0C-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/202308280752.Jl0Lli0C-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/staging/octeon/ethernet.c:11:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:28:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from drivers/staging/octeon/ethernet.c:11:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:28:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from drivers/staging/octeon/ethernet.c:11:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:28:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/staging/octeon/ethernet.c:204:32: error: variable has incomplete type 'struct cvmx_pip_port_status_t'
struct cvmx_pip_port_status_t rx_status;
^
drivers/staging/octeon/ethernet.c:204:9: note: forward declaration of 'struct cvmx_pip_port_status_t'
struct cvmx_pip_port_status_t rx_status;
^
12 warnings and 1 error generated.
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] 4+ messages in thread