From: Jiri Kosina <jikos@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Nehal Shah <nehal-bakulchandra.shah@amd.com>,
Basavaraj Natikar <basavaraj.natikar@amd.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: amd_sfh: Remove useless DMA-32 fallback configuration
Date: Mon, 24 Jan 2022 09:16:38 +0100 (CET) [thread overview]
Message-ID: <nycvar.YFH.7.76.2201240916280.28059@cbobk.fhfr.pm> (raw)
In-Reply-To: <a1ce59490a9a32f638a41fb80ff4b4598c33acec.1642260273.git.christophe.jaillet@wanadoo.fr>
On Sat, 15 Jan 2022, Christophe JAILLET wrote:
> As stated in [1], dma_set_mask() with a 64-bit mask never fails if
> dev->dma_mask is non-NULL.
> So, if it fails, the 32 bits case will also fail for the same reason.
>
> Simplify code and remove some dead code accordingly.
>
> [1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 2503be0253d3..673536d1d9ba 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -248,11 +248,8 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
> pci_set_master(pdev);
> rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
> if (rc) {
> - rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> - if (rc) {
> - dev_err(&pdev->dev, "failed to set DMA mask\n");
> - return rc;
> - }
> + dev_err(&pdev->dev, "failed to set DMA mask\n");
> + return rc;
> }
Applied, thank you.
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2022-01-24 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-15 15:24 Christophe JAILLET
2022-01-17 9:34 ` Basavaraj Natikar
2022-01-24 8:16 ` Jiri Kosina [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=nycvar.YFH.7.76.2201240916280.28059@cbobk.fhfr.pm \
--to=jikos@kernel.org \
--cc=basavaraj.natikar@amd.com \
--cc=benjamin.tissoires@redhat.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nehal-bakulchandra.shah@amd.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
all inboxes | Powered by JetHome®