linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-kernel@vger.kernel.org,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Amarula patchwork <linux-amarula@amarulasolutions.com>,
	michael@amarulasolutions.com,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [RFC PATCH 0/4] can: bxcan: add support for ST bxCAN controller
Date: Wed, 17 Aug 2022 23:16:04 +0200	[thread overview]
Message-ID: <20220817211604.o44ojny342ynk7zg@pengutronix.de> (raw)
In-Reply-To: <20220817143529.257908-1-dario.binacchi@amarulasolutions.com>

[-- Attachment #1: Type: text/plain, Size: 6096 bytes --]

I've stripped down the Cc list a bit...

On 17.08.2022 16:35:25, Dario Binacchi wrote:
> The series adds support for the basic extended CAN controller (bxCAN)
> found in many low- to middle-end STM32 SoCs.
>
> The driver has been tested on the stm32f469i-discovery board with a
> kernel version 5.19.0-rc2 in loopback + silent mode:

I've had no time for a in depth review, but here are some warnings by
the standard checker tools:

Please fix these sparse errors:

| drivers/net/can/bxcan/bxcan-drv.c:641:39: warning: incorrect type in initializer (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:641:39:    expected struct bxcan_regs *regs
| drivers/net/can/bxcan/bxcan-drv.c:641:39:    got struct bxcan_regs [noderef] __iomem *regs
| drivers/net/can/bxcan/bxcan-drv.c:650:15: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:650:15:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:650:15:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:667:20: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:667:20:    expected void volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:667:20:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:672:17: warning: incorrect type in argument 2 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:672:17:    expected void volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:672:17:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:675:9: warning: incorrect type in argument 2 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:675:9:    expected void volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:675:9:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:677:15: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:677:15:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:677:15:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:703:14: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:703:14:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:703:14:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:709:15: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:709:15:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:709:15:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:718:50: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:718:50:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:718:50:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:730:39: warning: incorrect type in initializer (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:730:39:    expected struct bxcan_regs *regs
| drivers/net/can/bxcan/bxcan-drv.c:730:39:    got struct bxcan_regs [noderef] __iomem *regs
| drivers/net/can/bxcan/bxcan-drv.c:735:24: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:735:24:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:735:24:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:742:17: warning: incorrect type in argument 2 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:742:17:    expected void volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:742:17:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:747:28: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:747:28:    expected void volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:747:28:    got unsigned int *
| drivers/net/can/bxcan/bxcan-drv.c:802:39: warning: incorrect type in initializer (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:802:39:    expected struct bxcan_regs *regs
| drivers/net/can/bxcan/bxcan-drv.c:802:39:    got struct bxcan_regs [noderef] __iomem *regs
| drivers/net/can/bxcan/bxcan-drv.c:810:15: warning: incorrect type in argument 1 (different address spaces)
| drivers/net/can/bxcan/bxcan-drv.c:810:15:    expected void const volatile [noderef] __iomem *addr
| drivers/net/can/bxcan/bxcan-drv.c:810:15:    got unsigned int *

(To enable sparse checking, do a "make C=1" to compile.)

Please fix these checkpatch warnings:

| WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
| #74:
| new file mode 100644

Please create a MAINTAINERS entry.

| WARNING: Using vsprintf specifier '%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '%p'.
| #307: FILE: drivers/net/can/bxcan/bxcan-core.c:179:
| +       dev_info(&pdev->dev, "regs: %px\n", priv->base);

Please remove the print of the base address.

| WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
| #356: FILE: drivers/net/can/bxcan/bxcan-core.h:21:
| +static inline void bxcan_rmw(volatile void __iomem *addr, u32 clear, u32 set)

remove the volatile.

| WARNING: Using vsprintf specifier '%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '%p'.
| #1273: FILE: drivers/net/can/bxcan/bxcan-drv.c:899:
| +       }
| +
| +       dev_info(dev, "regs: %px, clk: %d Hz, IRQs: %d, %d, %d\n",
| +                priv->regs, priv->can.clock.freq, tx_irq, rx_irq,
| +                sce_irq);

Remote the print of the regs.

regards,
Marc

--
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2022-08-17 21:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 14:35 [RFC PATCH 0/4] can: bxcan: add support for ST bxCAN controller Dario Binacchi
2022-08-17 14:35 ` [RFC PATCH 1/4] dt-bindings: net: can: add STM32 bxcan DT bindings Dario Binacchi
2022-08-18  8:22   ` Krzysztof Kozlowski
2022-08-20  8:08     ` Dario Binacchi
2022-08-22 17:39       ` Krzysztof Kozlowski
2022-08-26  7:20         ` Dario Binacchi
2022-08-17 14:35 ` [RFC PATCH 2/4] ARM: dts: stm32: add CAN support on stm32f429 Dario Binacchi
2022-08-17 14:35 ` [RFC PATCH 3/4] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Dario Binacchi
2022-08-18  8:22   ` Krzysztof Kozlowski
2022-08-17 14:35 ` [RFC PATCH 4/4] can: bxcan: add support for ST bxCAN controller Dario Binacchi
2022-08-18 10:30   ` Marc Kleine-Budde
2022-08-18 13:08     ` Marc Kleine-Budde
2022-08-17 21:16 ` Marc Kleine-Budde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220817211604.o44ojny342ynk7zg@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=alexandre.torgue@foss.st.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michael@amarulasolutions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).