From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: sparclinux@vger.kernel.org
Subject: [PATCH] iommu-common: Fix PARISC compile-time warnings
Date: Fri, 17 Apr 2015 02:28:04 +0000 [thread overview]
Message-ID: <20150417022804.GA708@oracle.com> (raw)
Fixes warnings due to
- no DMA_ERROR_CODE on PARISC,
- sizeof (unsigned long) = 4 bytes on PARISC.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
lib/iommu-common.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/iommu-common.c b/lib/iommu-common.c
index 7583f9b..fac4f35 100644
--- a/lib/iommu-common.c
+++ b/lib/iommu-common.c
@@ -10,6 +10,10 @@
#include <linux/iommu-common.h>
#include <linux/dma-mapping.h>
+#ifndef DMA_ERROR_CODE
+#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
+#endif
+
#define IOMMU_LARGE_ALLOC 15
/*
@@ -121,7 +125,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev,
boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
1 << iommu->page_table_shift);
else
- boundary_size = ALIGN(1UL << 32, 1 << iommu->page_table_shift);
+ boundary_size = ALIGN(1ULL << 32, 1 << iommu->page_table_shift);
shift = iommu->page_table_map_base >> iommu->page_table_shift;
boundary_size = boundary_size >> iommu->page_table_shift;
--
1.7.1
next reply other threads:[~2015-04-17 2:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 2:28 Sowmini Varadhan [this message]
2015-04-17 19:24 ` [PATCH] iommu-common: Fix PARISC compile-time warnings David Miller
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=20150417022804.GA708@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=sparclinux@vger.kernel.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.