Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2eb4178f authored by Jordan Crouse's avatar Jordan Crouse
Browse files

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: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 944b9617
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}