All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: manivannan.sadhasivam@linaro.org, imx@lists.linux.dev,
	arnd@arndb.de, gregkh@linuxfoundation.org, kishon@kernel.org,
	kw@linux.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 1/1] misc: pci_endpoint_test: Refactor dma_set_mask_and_coherent() logic
Date: Tue, 7 May 2024 09:48:58 +0200	[thread overview]
Message-ID: <Zjnc6s97DbrGm8t1@ryzen.lan> (raw)
In-Reply-To: <20240502195903.3191049-1-Frank.Li@nxp.com>

On Thu, May 02, 2024 at 03:59:03PM -0400, Frank Li wrote:
> dma_set_mask_and_coherent() should never fail when the mask is >= 32bit,
> unless the architecture has no DMA support. So no need check for the error
> and also no need to set dma_set_mask_and_coherent(32) as a fallback.
> 
> Even if dma_set_mask_and_coherent(48) fails due to the lack of DMA support
> (theoretically), then dma_set_mask_and_coherent(32) will also fail for the
> same reason. So the fallback doesn't make sense.
> 
> Due to the above reasons, let's simplify the code by setting the streaming
> and coherent DMA mask to 48 bits.
> 
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---

Reviewed-by: Niklas Cassel <cassel@kernel.org>

  reply	other threads:[~2024-05-07  7:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 19:59 [PATCH v2 1/1] misc: pci_endpoint_test: Refactor dma_set_mask_and_coherent() logic Frank Li
2024-05-07  7:48 ` Niklas Cassel [this message]
2024-05-17 10:03 ` Krzysztof Wilczyński

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=Zjnc6s97DbrGm8t1@ryzen.lan \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.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.