All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: conleylee@foxmail.com
Cc: davem@davemloft.net, kuba@kernel.org, mripard@kernel.org,
	wens@csie.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] sun4i-emac.c: add dma support
Date: Fri, 7 Jan 2022 15:34:18 -0800	[thread overview]
Message-ID: <202201071532.57A08030@keescook> (raw)
In-Reply-To: <tencent_DE05ADA53D5B084D4605BE6CB11E49EF7408@qq.com>

On Wed, Dec 29, 2021 at 09:43:51AM +0800, conleylee@foxmail.com wrote:
> From: Conley Lee <conleylee@foxmail.com>
>
> Thanks for your review. Here is the new version for this patch.
>
> This patch adds support for the emac rx dma present on sun4i. The emac
> is able to move packets from rx fifo to RAM by using dma.
>
> Change since v4.
>   - rename sbk field to skb
>   - rename alloc_emac_dma_req to emac_alloc_dma_req
>   - using kzalloc(..., GPF_ATOMIC) in interrupt context to avoid
>     sleeping
>   - retry by using emac_inblk_32bit when emac_dma_inblk_32bit fails
>   - fix some code style issues
>
> Change since v5.
>   - fix some code style issue
>
> Signed-off-by: Conley Lee <conleylee@foxmail.com>
> ---
>  drivers/net/ethernet/allwinner/sun4i-emac.c | 200 ++++++++++++++++++++
>  1 file changed, 200 insertions(+)

This is causing build failures:

$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 allmodconfig
$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -j... -k -s
drivers/net/ethernet/allwinner/sun4i-emac.c: In function 'emac_configure_dma':
drivers/net/ethernet/allwinner/sun4i-emac.c:922:60: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  922 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
      |                                                           ~^
      |                                                            |                                      |                                                            unsigned int
      |                                                           %llx
  923 |                     regs->start, resource_size(regs));
      |                     ~~~~~~~~~~~
      |                         |
      |                         resource_size_t {aka long long unsigned int}
drivers/net/ethernet/allwinner/sun4i-emac.c:922:71: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  922 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
      |                                                                      ~^
      |                                                                       |
      |                                                                       unsigned int
      |                                                                      %llu
  923 |                     regs->start, resource_size(regs));
      |                                  ~~~~~~~~~~~~~~~~~~~
      |                                  |
      |                                  resource_size_t {aka long long unsigned int}


--
Kees Cook

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: conleylee@foxmail.com
Cc: davem@davemloft.net, kuba@kernel.org, mripard@kernel.org,
	wens@csie.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] sun4i-emac.c: add dma support
Date: Fri, 7 Jan 2022 15:34:18 -0800	[thread overview]
Message-ID: <202201071532.57A08030@keescook> (raw)
In-Reply-To: <tencent_DE05ADA53D5B084D4605BE6CB11E49EF7408@qq.com>

On Wed, Dec 29, 2021 at 09:43:51AM +0800, conleylee@foxmail.com wrote:
> From: Conley Lee <conleylee@foxmail.com>
>
> Thanks for your review. Here is the new version for this patch.
>
> This patch adds support for the emac rx dma present on sun4i. The emac
> is able to move packets from rx fifo to RAM by using dma.
>
> Change since v4.
>   - rename sbk field to skb
>   - rename alloc_emac_dma_req to emac_alloc_dma_req
>   - using kzalloc(..., GPF_ATOMIC) in interrupt context to avoid
>     sleeping
>   - retry by using emac_inblk_32bit when emac_dma_inblk_32bit fails
>   - fix some code style issues
>
> Change since v5.
>   - fix some code style issue
>
> Signed-off-by: Conley Lee <conleylee@foxmail.com>
> ---
>  drivers/net/ethernet/allwinner/sun4i-emac.c | 200 ++++++++++++++++++++
>  1 file changed, 200 insertions(+)

This is causing build failures:

$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 allmodconfig
$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -j... -k -s
drivers/net/ethernet/allwinner/sun4i-emac.c: In function 'emac_configure_dma':
drivers/net/ethernet/allwinner/sun4i-emac.c:922:60: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  922 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
      |                                                           ~^
      |                                                            |                                      |                                                            unsigned int
      |                                                           %llx
  923 |                     regs->start, resource_size(regs));
      |                     ~~~~~~~~~~~
      |                         |
      |                         resource_size_t {aka long long unsigned int}
drivers/net/ethernet/allwinner/sun4i-emac.c:922:71: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
  922 |         netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
      |                                                                      ~^
      |                                                                       |
      |                                                                       unsigned int
      |                                                                      %llu
  923 |                     regs->start, resource_size(regs));
      |                                  ~~~~~~~~~~~~~~~~~~~
      |                                  |
      |                                  resource_size_t {aka long long unsigned int}


--
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-01-07 23:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24 14:44 [PATCH v4] sun4i-emac.c: add dma support conleylee
2021-12-28  2:35 ` Jakub Kicinski
2021-12-28 11:42 ` [PATCH v5] " conleylee
2021-12-29  0:48   ` Jakub Kicinski
2021-12-29  0:48     ` Jakub Kicinski
2021-12-29  1:43     ` [PATCH v6] " conleylee
2021-12-29  1:43       ` conleylee
2021-12-30  2:00       ` patchwork-bot+netdevbpf
2021-12-30  2:00         ` patchwork-bot+netdevbpf
2022-05-30  4:51         ` Corentin Labbe
2022-05-30  4:51           ` Corentin Labbe
2022-05-30 18:48           ` Jakub Kicinski
2022-05-30 18:48             ` Jakub Kicinski
2022-05-30 18:55             ` Corentin Labbe
2022-05-30 18:55               ` Corentin Labbe
2021-12-31 10:43       ` Corentin Labbe
2021-12-31 10:43         ` Corentin Labbe
     [not found]         ` <tencent_57960DDC83F43DA3E0A2F47DEBAD69A4A005@qq.com>
2022-01-02 17:38           ` Corentin Labbe
2022-01-02 17:38             ` Corentin Labbe
     [not found]             ` <tencent_67023336008FE777A58293D2D32DEFA69107@qq.com>
2022-01-03 11:42               ` Corentin Labbe
2022-01-03 11:42                 ` Corentin Labbe
2022-01-03 12:21                 ` Conley Lee
2022-01-03 12:21                   ` Conley Lee
2022-01-09  9:17                 ` [PATCH v1] sun4i-emac.c: enable emac tx dma conleylee
2022-01-09  9:17                   ` conleylee
2022-01-09 20:45                   ` Corentin Labbe
2022-01-09 20:45                     ` Corentin Labbe
2022-01-10  7:47                     ` Conley Lee
2022-01-10  7:47                       ` Conley Lee
2022-01-07 23:34       ` Kees Cook [this message]
2022-01-07 23:34         ` [PATCH v6] sun4i-emac.c: add dma support Kees Cook
2022-01-08  2:34         ` Jakub Kicinski
2022-01-08  2:34           ` Jakub Kicinski

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=202201071532.57A08030@keescook \
    --to=keescook@chromium.org \
    --cc=conleylee@foxmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wens@csie.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.