linux/drivers/iommu
Linus Torvalds 194dc870a5 Add braces to avoid "ambiguous ‘else’" compiler warnings
Some of our "for_each_xyz()" macro constructs make gcc unhappy about
lack of braces around if-statements inside or outside the loop, because
the loop construct itself has a "if-then-else" statement inside of it.

The resulting warnings look something like this:

  drivers/gpu/drm/i915/i915_debugfs.c: In function ‘i915_dump_lrc’:
  drivers/gpu/drm/i915/i915_debugfs.c:2103:6: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
     if (ctx != dev_priv->kernel_context)
        ^

even if the code itself is fine.

Since the warning is fairly easy to avoid by adding a braces around the
if-statement near the for_each_xyz() construct, do so, rather than
disabling the otherwise potentially useful warning.

(The if-then-else statements used in the "for_each_xyz()" constructs are
designed to be inherently safe even with no braces, but in this case
it's quite understandable that gcc isn't really able to tell that).

This finally leaves the standard "allmodconfig" build with just a
handful of remaining warnings, so new and valid warnings hopefully will
stand out.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-07-27 20:03:31 -07:00
..
Kconfig Merge branches 'arm/io-pgtable', 'arm/rockchip', 'arm/omap', 'x86/vt-d', 'ppc/pamu', 'core' and 'x86/amd' into next 2016-05-09 19:39:17 +02:00
Makefile
amd_iommu.c IOMMU Updates for Linux v4.7 2016-05-19 17:07:04 -07:00
amd_iommu_init.c iommu/amd: Fix unity mapping initialization race 2016-07-06 18:04:55 +02:00
amd_iommu_proto.h
amd_iommu_types.h iommu/amd: Remove statistics code 2016-05-09 16:58:37 +02:00
amd_iommu_v2.c mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
arm-smmu-v3.c iommu/arm-smmu: Wire up map_sg for arm-smmu-v3 2016-06-13 11:00:59 +02:00
arm-smmu.c remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
dma-iommu.c iommu/dma: Finish optimising higher-order allocations 2016-05-09 15:33:29 +02:00
dmar.c Add braces to avoid "ambiguous ‘else’" compiler warnings 2016-07-27 20:03:31 -07:00
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
intel-iommu.c Add braces to avoid "ambiguous ‘else’" compiler warnings 2016-07-27 20:03:31 -07:00
intel-svm.c mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
intel_irq_remapping.c
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Support IOMMU_MMIO flag 2016-04-07 15:07:50 +02:00
io-pgtable-arm.c iommu/io-pgtable-arm: Support IOMMU_MMIO flag 2016-04-07 15:07:50 +02:00
io-pgtable.c iommu/io-pgtable: Fix a brace coding style issue. 2016-04-05 15:34:29 +02:00
io-pgtable.h iommu/io-pgtable: Add MTK 4GB mode in Short-descriptor 2016-04-05 15:39:37 +02:00
iommu-sysfs.c
iommu-traces.c
iommu.c IOMMU Updates for Linux v4.7 2016-05-19 17:07:04 -07:00
iova.c iommu/iova: Disable preemption around use of this_cpu_ptr() 2016-06-27 13:07:45 +02:00
ipmmu-vmsa.c
irq_remapping.c x86/cpufeature: Replace cpu_has_apic with boot_cpu_has() usage 2016-04-13 11:37:41 +02:00
irq_remapping.h
msm_iommu.c
msm_iommu.h
msm_iommu_dev.c
msm_iommu_hw-8xxx.h
mtk_iommu.c Merge branches 'arm/io-pgtable', 'arm/rockchip', 'arm/omap', 'x86/vt-d', 'ppc/pamu', 'core' and 'x86/amd' into next 2016-05-09 19:39:17 +02:00
of_iommu.c iommu: of: enforce const-ness of struct iommu_ops 2016-05-09 15:33:29 +02:00
omap-iommu-debug.c iommu/omap: Align code with open parenthesis 2016-04-05 17:53:20 +02:00
omap-iommu.c iommu/omap: Use WARN_ON for page table alignment check 2016-04-05 17:53:20 +02:00
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: Fix zap cache during device attach 2016-06-15 12:03:00 +02:00
s390-iommu.c
tegra-gart.c
tegra-smmu.c