public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] acpi-dma: fix sparse warning
@ 2013-07-15 12:04 Andy Shevchenko
  2013-07-15 12:04 ` [PATCH 2/6] dma: dw: append MODULE_DEVICE_TABLE for ACPI case Andy Shevchenko
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Andy Shevchenko @ 2013-07-15 12:04 UTC (permalink / raw)
  To: Viresh Kumar, Vinod Koul, linux-kernel, spear-devel; +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>
Reviewed-by: Mika Westerberg <mika.westerberg@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.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-22  9:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 12:04 [PATCH 1/6] acpi-dma: fix sparse warning Andy Shevchenko
2013-07-15 12:04 ` [PATCH 2/6] dma: dw: append MODULE_DEVICE_TABLE for ACPI case Andy Shevchenko
2013-07-15 12:04 ` [PATCH 3/6] dma: dw: improve comparison with ~0 Andy Shevchenko
2013-07-15 12:04 ` [PATCH 4/6] dma: dw: allow shared interrupts Andy Shevchenko
2013-07-15 12:04 ` [PATCH 5/6] dma: dw: return DMA_SUCCESS immediately from device_tx_status() Andy Shevchenko
2013-07-15 12:04 ` [PATCH 6/6] dma: dw: return DMA_PAUSED only if cookie status is DMA_IN_PROGRESS Andy Shevchenko
2013-07-16 10:18 ` [PATCH 1/6] acpi-dma: fix sparse warning Viresh Kumar
2013-07-22  9:15 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox