Subject: Re: [PATCH net-next v6 00/13] net: wwan: t7xx: PCIe driver for MediaTek M.2 modem

From: Jakub Kicinski <[email-masked]>
Date: Thu, 7 Apr 2022 21:15:47 -0700

On Thu,  7 Apr 2022 15:36:16 -0700 Ricardo Martinez wrote:
> t7xx is the PCIe host device driver for Intel 5G 5000 M.2 solution which
> is based on MediaTek's T700 modem to provide WWAN connectivity.
> The driver uses the WWAN framework infrastructure to create the following
> control ports and network interfaces:
> * /dev/wwan0mbim0 - Interface conforming to the MBIM protocol.
>   Applications like libmbim [1] or Modem Manager [2] from v1.16 onwards
>   with [3][4] can use it to enable data communication towards WWAN.
> * /dev/wwan0at0 - Interface that supports AT commands.
> * wwan0 - Primary network interface for IP traffic.

Does not build here (allmodconfig, W=1, gcc 11).

drivers/net/wwan/t7xx/t7xx_hif_cldma.c: In function ‘t7xx_cldma_irq_work_cb’:
include/linux/find.h:40:23: error: array subscript ‘long unsigned int[0]’ is partly outside array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
   40 |                 val = *addr & GENMASK(size - 1, offset);
      |                       ^~~~~
drivers/net/wwan/t7xx/t7xx_hif_cldma.c:569:43: note: while referencing ‘l2_tx_int’
  569 |         u32 l2_tx_int_msk, l2_rx_int_msk, l2_tx_int, l2_rx_int, val;
      |                                           ^~~~~~~~~
In file included from ../include/linux/bitmap.h:9,
                 from ../include/linux/cpumask.h:12,
                 from ../arch/x86/include/asm/paravirt.h:17,
                 from ../arch/x86/include/asm/irqflags.h:63,
                 from ../include/linux/irqflags.h:16,
                 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/delay.h:23,
                 from ../drivers/net/wwan/t7xx/t7xx_hif_cldma.c:21:
include/linux/find.h:40:23: error: array subscript ‘long unsigned int[0]’ is partly outside array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
   40 |                 val = *addr & GENMASK(size - 1, offset);
      |                       ^~~~~
drivers/net/wwan/t7xx/t7xx_hif_cldma.c:569:54: note: while referencing ‘l2_rx_int’
  569 |         u32 l2_tx_int_msk, l2_rx_int_msk, l2_tx_int, l2_rx_int, val;
      |                                                      ^~~~~~~~~