From 2eb4178f8e15a862a787ff5244d49b3b2495e420 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Tue, 6 Aug 2019 15:57:34 -0600 Subject: [PATCH] iommu/arm-smmu: Fix a few compiler warnings The following error occurs when manually building the kernel. ./include/trace/define_trace.h:95:43: fatal error: ./arm-smmu-trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) Fix the path so it can always be found. Also, with gcc 7.4.1 the following warning occurs: drivers/iommu/arm-smmu.c:4382:17: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=] dev_err(dev, "Unable to read interconnect path from devicetree rc: %d\n", Because PTR_ERR is a cast from a pointer, it is always a unsigned long. Fix the argument. Change-Id: Ic0dedbad992eaa72d9a6127316c4ffbbb8816ef8 Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-trace.h | 2 +- drivers/iommu/arm-smmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu-trace.h b/drivers/iommu/arm-smmu-trace.h index 44cb073898db..174324b8bb5e 100644 --- a/drivers/iommu/arm-smmu-trace.h +++ b/drivers/iommu/arm-smmu-trace.h @@ -75,7 +75,7 @@ TRACE_EVENT(smmu_init, #endif /* _TRACE_ARM_SMMU_H */ #undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_PATH ../../drivers/iommu #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE arm-smmu-trace diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 59cdb0406c00..7327311bf9de 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -4374,7 +4374,7 @@ static int arm_smmu_init_interconnect(struct arm_smmu_power_resources *pwr) pwr->icc_path = of_icc_get(dev, NULL); if (IS_ERR_OR_NULL(pwr->icc_path)) { if (PTR_ERR(pwr->icc_path) != -EPROBE_DEFER) - dev_err(dev, "Unable to read interconnect path from devicetree rc: %d\n", + dev_err(dev, "Unable to read interconnect path from devicetree rc: %ld\n", PTR_ERR(pwr->icc_path)); return pwr->icc_path ? PTR_ERR(pwr->icc_path) : -EINVAL; }