* [PATCH] acpi-dma: fix sparse warning
@ 2013-06-18 14:19 Andy Shevchenko
2013-06-18 14:36 ` Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2013-06-18 14:19 UTC (permalink / raw)
To: Mika Westerberg, Vinod Koul, linux-kernel; +Cc: Andy Shevchenko
This patch fixes sparse warning:
drivers/dma/acpi-dma.c:76:21: sparse: cast to restricted __le32
Since everything in all ACPI tables is little-endian, by definition, the used
types in practice are uXX. Thus, we have to enforce __leXX if we want to
convert them to CPU order.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/dma/acpi-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c
index 5a18f82..ba7f932 100644
--- a/drivers/dma/acpi-dma.c
+++ b/drivers/dma/acpi-dma.c
@@ -73,7 +73,7 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,
if (si->mmio_base_low != mem || si->gsi_interrupt != irq)
return 0;
- vendor_id = le32_to_cpu(grp->vendor_id);
+ vendor_id = le32_to_cpu((__force __le32)grp->vendor_id);
dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",
(char *)&vendor_id, grp->device_id, grp->revision);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] acpi-dma: fix sparse warning
2013-06-18 14:19 [PATCH] acpi-dma: fix sparse warning Andy Shevchenko
@ 2013-06-18 14:36 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2013-06-18 14:36 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Vinod Koul, linux-kernel
On Tue, Jun 18, 2013 at 05:19:27PM +0300, Andy Shevchenko wrote:
> This patch fixes sparse warning:
> drivers/dma/acpi-dma.c:76:21: sparse: cast to restricted __le32
>
> Since everything in all ACPI tables is little-endian, by definition, the used
> types in practice are uXX. Thus, we have to enforce __leXX if we want to
> convert them to CPU order.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Even though it is ugly,
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-18 14:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 14:19 [PATCH] acpi-dma: fix sparse warning Andy Shevchenko
2013-06-18 14:36 ` Mika Westerberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox