linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] pull-request: can-next 2022-05-23
@ 2022-05-23 20:10 Marc Kleine-Budde
  2022-05-23 20:10 ` [PATCH net-next 1/3] can: peak_usb: fix typo in comment Marc Kleine-Budde
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2022-05-23 20:10 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, linux-can, kernel

Hello Jakub, hello David,

(this time with fixes subject to make patchwork happy)

this is a pull request of 3 patches for net-next/master.

The first patch is by Julia Lawall and fixes a typo in the peak_usb
driver.

Jakub Kicinski contributes a patch for the kvaser_usb driver to
silence a GCC 12 -Warray-bounds warning.

The last patch is by me, target the ctucanfd platform driver and adds
a missing dependency to HAS_IOMEM.

regards,
Marc

---

The following changes since commit fe7324b932222574a0721b80e72c6c5fe57960d1:

  net: dsa: OF-ware slave_mii_bus (2022-05-23 12:27:53 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git tags/linux-can-next-for-5.19-20220523

for you to fetch changes up to 8f445a3ec3fd36feb90c5b2ef8d21e2492819cdc:

  can: ctucanfd: platform: add missing dependency to HAS_IOMEM (2022-05-23 22:00:06 +0200)

----------------------------------------------------------------
linux-can-next-for-5.19-20220523

----------------------------------------------------------------
Jakub Kicinski (1):
      can: kvaser_usb: silence a GCC 12 -Warray-bounds warning

Julia Lawall (1):
      can: peak_usb: fix typo in comment

Marc Kleine-Budde (1):
      can: ctucanfd: platform: add missing dependency to HAS_IOMEM

 drivers/net/can/ctucanfd/Kconfig        | 2 +-
 drivers/net/can/usb/kvaser_usb/Makefile | 5 +++++
 drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next 1/3] can: peak_usb: fix typo in comment
  2022-05-23 20:10 [PATCH net-next 0/3] pull-request: can-next 2022-05-23 Marc Kleine-Budde
@ 2022-05-23 20:10 ` Marc Kleine-Budde
  2022-05-23 23:10   ` patchwork-bot+netdevbpf
  2022-05-23 20:10 ` [PATCH net-next 2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning Marc Kleine-Budde
  2022-05-23 20:10 ` [PATCH net-next 3/3] can: ctucanfd: platform: add missing dependency to HAS_IOMEM Marc Kleine-Budde
  2 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2022-05-23 20:10 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, linux-can, kernel, Julia Lawall, Marc Kleine-Budde

From: Julia Lawall <Julia.Lawall@inria.fr>

Spelling mistake (triple letters) in comment.
Detected with the help of Coccinelle.

Link: https://lore.kernel.org/all/20220521111145.81697-24-Julia.Lawall@inria.fr
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
index 17dc178f555b..091c631ebe23 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -533,7 +533,7 @@ static int pcan_usb_handle_bus_evt(struct pcan_usb_msg_context *mc, u8 ir)
 {
 	struct pcan_usb *pdev = mc->pdev;
 
-	/* acccording to the content of the packet */
+	/* according to the content of the packet */
 	switch (ir) {
 	case PCAN_USB_ERR_CNT_DEC:
 	case PCAN_USB_ERR_CNT_INC:

base-commit: fe7324b932222574a0721b80e72c6c5fe57960d1
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning
  2022-05-23 20:10 [PATCH net-next 0/3] pull-request: can-next 2022-05-23 Marc Kleine-Budde
  2022-05-23 20:10 ` [PATCH net-next 1/3] can: peak_usb: fix typo in comment Marc Kleine-Budde
@ 2022-05-23 20:10 ` Marc Kleine-Budde
  2022-05-23 20:10 ` [PATCH net-next 3/3] can: ctucanfd: platform: add missing dependency to HAS_IOMEM Marc Kleine-Budde
  2 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2022-05-23 20:10 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, linux-can, kernel, Marc Kleine-Budde

From: Jakub Kicinski <kuba@kernel.org>

This driver does a lot of casting of smaller buffers to
struct kvaser_cmd_ext, GCC 12 does not like that:

| drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:489:65: warning: array subscript ‘struct kvaser_cmd_ext[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Warray-bounds]
| drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:489:23: note: in expansion of macro ‘le16_to_cpu’
|   489 |                 ret = le16_to_cpu(((struct kvaser_cmd_ext *)cmd)->len);
|       |                       ^~~~~~~~~~~

Temporarily silence this warning (move it to W=1 builds).

Link: https://lore.kernel.org/all/20220520194659.2356903-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/kvaser_usb/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/can/usb/kvaser_usb/Makefile b/drivers/net/can/usb/kvaser_usb/Makefile
index cf260044f0b9..b20d951a0790 100644
--- a/drivers/net/can/usb/kvaser_usb/Makefile
+++ b/drivers/net/can/usb/kvaser_usb/Makefile
@@ -1,3 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_CAN_KVASER_USB) += kvaser_usb.o
 kvaser_usb-y = kvaser_usb_core.o kvaser_usb_leaf.o kvaser_usb_hydra.o
+
+# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
+ifndef KBUILD_EXTRA_WARN
+CFLAGS_kvaser_usb_hydra.o += -Wno-array-bounds
+endif
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 3/3] can: ctucanfd: platform: add missing dependency to HAS_IOMEM
  2022-05-23 20:10 [PATCH net-next 0/3] pull-request: can-next 2022-05-23 Marc Kleine-Budde
  2022-05-23 20:10 ` [PATCH net-next 1/3] can: peak_usb: fix typo in comment Marc Kleine-Budde
  2022-05-23 20:10 ` [PATCH net-next 2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning Marc Kleine-Budde
@ 2022-05-23 20:10 ` Marc Kleine-Budde
  2 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2022-05-23 20:10 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, linux-can, kernel, Marc Kleine-Budde,
	kernel test robot, Pavel Pisa, Ondrej Ille

The kernel test robot noticed that the ctucanfd platform driver fails
during modpost on platforms that don't support IOMEM.

| ERROR: modpost: "devm_ioremap_resource" [drivers/net/can/ctucanfd/ctucanfd_platform.ko] undefined!

This patch adds the missing HAS_IOMEM dependency.

Link: https://lore.kernel.org/all/20220523123720.1656611-1-mkl@pengutronix.de
Fixes: e8f0c23a2415 ("can: ctucanfd: CTU CAN FD open-source IP core - platform/SoC support.")
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: Ondrej Ille <ondrej.ille@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/ctucanfd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/ctucanfd/Kconfig b/drivers/net/can/ctucanfd/Kconfig
index 3c383612eb17..6e2073351a8f 100644
--- a/drivers/net/can/ctucanfd/Kconfig
+++ b/drivers/net/can/ctucanfd/Kconfig
@@ -23,7 +23,7 @@ config CAN_CTUCANFD_PCI
 
 config CAN_CTUCANFD_PLATFORM
 	tristate "CTU CAN-FD IP core platform (FPGA, SoC) driver"
-	depends on OF || COMPILE_TEST
+	depends on HAS_IOMEM && (OF || COMPILE_TEST)
 	select CAN_CTUCANFD
 	help
 	  The core has been tested together with OpenCores SJA1000
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next 1/3] can: peak_usb: fix typo in comment
  2022-05-23 20:10 ` [PATCH net-next 1/3] can: peak_usb: fix typo in comment Marc Kleine-Budde
@ 2022-05-23 23:10   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-23 23:10 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: netdev, davem, kuba, linux-can, kernel, Julia.Lawall

Hello:

This series was applied to netdev/net-next.git (master)
by Marc Kleine-Budde <mkl@pengutronix.de>:

On Mon, 23 May 2022 22:10:43 +0200 you wrote:
> From: Julia Lawall <Julia.Lawall@inria.fr>
> 
> Spelling mistake (triple letters) in comment.
> Detected with the help of Coccinelle.
> 
> Link: https://lore.kernel.org/all/20220521111145.81697-24-Julia.Lawall@inria.fr
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> 
> [...]

Here is the summary with links:
  - [net-next,1/3] can: peak_usb: fix typo in comment
    https://git.kernel.org/netdev/net-next/c/a682d1843300
  - [net-next,2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning
    https://git.kernel.org/netdev/net-next/c/3e88445a3a5a
  - [net-next,3/3] can: ctucanfd: platform: add missing dependency to HAS_IOMEM
    https://git.kernel.org/netdev/net-next/c/8f445a3ec3fd

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next 2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning
  2022-05-23 20:08 [PATCH net-next 0/n] pull-request: can-next 2022-05-23 Marc Kleine-Budde
@ 2022-05-23 20:08 ` Marc Kleine-Budde
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2022-05-23 20:08 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, linux-can, kernel, Marc Kleine-Budde

From: Jakub Kicinski <kuba@kernel.org>

This driver does a lot of casting of smaller buffers to
struct kvaser_cmd_ext, GCC 12 does not like that:

| drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:489:65: warning: array subscript ‘struct kvaser_cmd_ext[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Warray-bounds]
| drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:489:23: note: in expansion of macro ‘le16_to_cpu’
|   489 |                 ret = le16_to_cpu(((struct kvaser_cmd_ext *)cmd)->len);
|       |                       ^~~~~~~~~~~

Temporarily silence this warning (move it to W=1 builds).

Link: https://lore.kernel.org/all/20220520194659.2356903-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/kvaser_usb/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/can/usb/kvaser_usb/Makefile b/drivers/net/can/usb/kvaser_usb/Makefile
index cf260044f0b9..b20d951a0790 100644
--- a/drivers/net/can/usb/kvaser_usb/Makefile
+++ b/drivers/net/can/usb/kvaser_usb/Makefile
@@ -1,3 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_CAN_KVASER_USB) += kvaser_usb.o
 kvaser_usb-y = kvaser_usb_core.o kvaser_usb_leaf.o kvaser_usb_hydra.o
+
+# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
+ifndef KBUILD_EXTRA_WARN
+CFLAGS_kvaser_usb_hydra.o += -Wno-array-bounds
+endif
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-23 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 20:10 [PATCH net-next 0/3] pull-request: can-next 2022-05-23 Marc Kleine-Budde
2022-05-23 20:10 ` [PATCH net-next 1/3] can: peak_usb: fix typo in comment Marc Kleine-Budde
2022-05-23 23:10   ` patchwork-bot+netdevbpf
2022-05-23 20:10 ` [PATCH net-next 2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning Marc Kleine-Budde
2022-05-23 20:10 ` [PATCH net-next 3/3] can: ctucanfd: platform: add missing dependency to HAS_IOMEM Marc Kleine-Budde
  -- strict thread matches above, loose matches on Subject: below --
2022-05-23 20:08 [PATCH net-next 0/n] pull-request: can-next 2022-05-23 Marc Kleine-Budde
2022-05-23 20:08 ` [PATCH net-next 2/3] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).