netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: jiri@nvidia.com, idosch@nvidia.com, davem@davemloft.net,
	kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mlxsw: pci: switch from 'pci_' to 'dma_' API
Date: Thu, 14 Jan 2021 11:47:07 +0200	[thread overview]
Message-ID: <20210114094707.GA1979201@shredder.lan> (raw)
In-Reply-To: <20210114084757.490540-1-christophe.jaillet@wanadoo.fr>

On Thu, Jan 14, 2021 at 09:47:57AM +0100, Christophe JAILLET wrote:
> The wrappers in include/linux/pci-dma-compat.h should go away.
> 
> The patch has been generated with the coccinelle script below and has been
> hand modified to replace GFP_ with a correct flag.
> It has been compile tested.
> 
> When memory is allocated in 'mlxsw_pci_queue_init()' and
> 'mlxsw_pci_fw_area_init()' GFP_KERNEL can be used because both functions
> are already using this flag and no lock is acquired.
> 
> When memory is allocated in 'mlxsw_pci_mbox_alloc()' GFP_KERNEL can be used
> because it is only called from the probe function and no lock is acquired
> in the between.
> The call chain is:
>   --> mlxsw_pci_probe()
>     --> mlxsw_pci_cmd_init()
>       --> mlxsw_pci_mbox_alloc()
> 
> While at it, also replace the 'dma_set_mask/dma_set_coherent_mask' sequence
> by a less verbose 'dma_set_mask_and_coherent() call.

[...]

> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

For net-next:

Tested-by: Ido Schimmel <idosch@nvidia.com>

Thanks

  reply	other threads:[~2021-01-14  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  8:47 [PATCH] mlxsw: pci: switch from 'pci_' to 'dma_' API Christophe JAILLET
2021-01-14  9:47 ` Ido Schimmel [this message]
2021-01-15  1:30 ` patchwork-bot+netdevbpf

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=20210114094707.GA1979201@shredder.lan \
    --to=idosch@idosch.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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 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).