linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] iommu: omap: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit
@ 2019-12-30 17:26 Krzysztof Kozlowski
  2019-12-30 17:26 ` [PATCH 2/3] iommu: omap: Fix printing format for size_t on 64-bit Krzysztof Kozlowski
  2019-12-30 17:26 ` [PATCH 3/3] iommu: Enable compile testing for some of drivers Krzysztof Kozlowski
  0 siblings, 2 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2019-12-30 17:26 UTC (permalink / raw)
  To: Joerg Roedel, Robin Murphy, Jean-Philippe Brucker, Eric Auger,
	Douglas Anderson, Suman Anna, Tero Kristo, iommu, linux-kernel
  Cc: Krzysztof Kozlowski

pointers should be casted to unsigned long to avoid
-Wpointer-to-int-cast warnings when compiling on 64-bit platform (e.g.
with COMPILE_TEST):

    drivers/iommu/omap-iommu.c: In function ‘omap2_iommu_enable’:
    drivers/iommu/omap-iommu.c:170:25: warning:
        cast from pointer to integer of different size [-Wpointer-to-int-cast]
      if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd,  SZ_16K))
                             ^

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/iommu/omap-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index be551cc34be4..50e8acf88ec4 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -167,7 +167,7 @@ static int omap2_iommu_enable(struct omap_iommu *obj)
 {
 	u32 l, pa;
 
-	if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd,  SZ_16K))
+	if (!obj->iopgd || !IS_ALIGNED((unsigned long)obj->iopgd,  SZ_16K))
 		return -EINVAL;
 
 	pa = virt_to_phys(obj->iopgd);
-- 
2.17.1


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

end of thread, other threads:[~2020-01-03  8:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30 17:26 [PATCH 1/3] iommu: omap: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit Krzysztof Kozlowski
2019-12-30 17:26 ` [PATCH 2/3] iommu: omap: Fix printing format for size_t on 64-bit Krzysztof Kozlowski
2020-01-02 22:30   ` Suman Anna
2019-12-30 17:26 ` [PATCH 3/3] iommu: Enable compile testing for some of drivers Krzysztof Kozlowski
2019-12-31  1:08   ` kbuild test robot
2019-12-31  8:14     ` Krzysztof Kozlowski
2019-12-31  7:43   ` kbuild test robot
2019-12-31  8:07     ` Krzysztof Kozlowski
2020-01-02 22:40       ` Suman Anna
2020-01-03  8:57         ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).