diff options
| author | Masahiro Yamada <[email protected]> | 2019-12-24 17:15:00 +0900 |
|---|---|---|
| committer | Will Deacon <[email protected]> | 2020-01-10 09:49:27 +0000 |
| commit | cd037ff2f98227148002084d588f03b348469fe4 (patch) | |
| tree | 4d1d77cd34b976cc3fb3e23f0732fd3ced1510df /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
| parent | 8efda06f83d65c015a99d99a195df533aec0fcf9 (diff) | |
iommu/arm-smmu: Fix -Wunused-const-variable warning
For ARCH=arm builds, OF is not necessarily enabled, that is, you can
build this driver without CONFIG_OF.
When CONFIG_OF is unset, of_match_ptr() is NULL, and arm_smmu_of_match
is left orphan.
Building it with W=1 emits a warning:
drivers/iommu/arm-smmu.c:1904:34: warning: ‘arm_smmu_of_match’ defined but not used [-Wunused-const-variable=]
static const struct of_device_id arm_smmu_of_match[] = {
^~~~~~~~~~~~~~~~~
There are two ways to fix this:
- annotate arm_smmu_of_match with __maybe_unused (or surround the
code with #ifdef CONFIG_OF ... #endif)
- stop using of_match_ptr()
This commit took the latter solution.
It slightly increases the object size, but it is probably not a big deal
because arm_smmu_device_dt_probe() is also compiled irrespective of
CONFIG_OF.
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions