Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210491
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA |
| Date | 2015-08-20 15:20 +0200 |
| Message-ID | <pZxV8-5W7-11@gated-at.bofh.it> (permalink) |
| References | <pV2mR-2q5-1@gated-at.bofh.it> <pXPWa-3m2-17@gated-at.bofh.it> <pZj5N-15x-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wednesday 19 August 2015 14:28:33 Duc Dang wrote:
>
> Hi Arnd,
>
> So the check will look like this, please let me know what do you think:
> if (!pdev->dev.dma_mask) {
> WARN_ON(1);
> /* Initialize dma_mask if the broken platform code has
> not done so */
> pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
> }
The condition can be written as
if (WARN_ON(!pdev->dev.dma_mask))
and I'd use dma_coerce_mask_and_coherent() instead of manually setting the
pointer, as an annotation for the fact that we are knowingly violating the
API here.
Those two points are just cosmetic though, aside from them, your code
above is what I had in mind.
Thanks,
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 03:10 +0200
Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Greg KH <gregkh@linuxfoundation.org> - 2015-08-08 03:30 +0200
Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 04:50 +0200
[PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-08 05:20 +0200
[PATCH v5 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 05:20 +0200
Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-08 11:30 +0200
Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-08 22:40 +0200
Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Arnd Bergmann <arnd@arndb.de> - 2015-08-15 22:10 +0200
Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-19 23:30 +0200
Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Arnd Bergmann <arnd@arndb.de> - 2015-08-20 15:20 +0200
[PATCH v7 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-20 21:40 +0200
[PATCH v7 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-20 21:50 +0200
Re: [PATCH v7 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-31 21:00 +0200
Re: [PATCH v7 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Mathias Nyman <mathias.nyman@linux.intel.com> - 2015-09-01 14:00 +0200
Re: [PATCH v7 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-09-01 14:10 +0200
[PATCH v6 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA Duc Dang <dhdang@apm.com> - 2015-08-10 09:40 +0200
[PATCH v6 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-10 09:40 +0200
Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Javier Martinez Canillas <javier@dowhile0.org> - 2015-08-08 07:50 +0200
Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Greg KH <gregkh@linuxfoundation.org> - 2015-08-08 17:40 +0200
Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Duc Dang <dhdang@apm.com> - 2015-08-08 18:50 +0200
Re: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Javier Martinez Canillas <javier@dowhile0.org> - 2015-08-08 23:10 +0200
csiph-web