+ iommu-intel-fix-variable-iommu-set-but-not-used.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: drivers/iommu/intel-iommu.c: fix variable 'iommu' set but not used
has been added to the -mm tree.  Its filename is
     iommu-intel-fix-variable-iommu-set-but-not-used.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/iommu-intel-fix-variable-iommu-set-but-not-used.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/iommu-intel-fix-variable-iommu-set-but-not-used.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Qian Cai <cai@xxxxxx>
Subject: drivers/iommu/intel-iommu.c: fix variable 'iommu' set but not used

cf04eee8bf0e ("iommu/vt-d: Include ACPI devices in iommu=pt") added
for_each_active_iommu() in iommu_prepare_static_identity_mapping() but
never used the each element, i.e, "drhd->iommu".

drivers/iommu/intel-iommu.c: In function
'iommu_prepare_static_identity_mapping':
drivers/iommu/intel-iommu.c:3037:22: warning: variable 'iommu' set but
not used [-Wunused-but-set-variable]
 struct intel_iommu *iommu;

Fixed the warning by appending a compiler attribute __maybe_unused for it.

Link: http://lkml.kernel.org/r/20190523013314.2732-1-cai@xxxxxx
Signed-off-by: Qian Cai <cai@xxxxxx>
Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Joerg Roedel <jroedel@xxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/iommu/intel-iommu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/iommu/intel-iommu.c~iommu-intel-fix-variable-iommu-set-but-not-used
+++ a/drivers/iommu/intel-iommu.c
@@ -3034,7 +3034,8 @@ static int __init iommu_prepare_static_i
 {
 	struct pci_dev *pdev = NULL;
 	struct dmar_drhd_unit *drhd;
-	struct intel_iommu *iommu;
+	/* To avoid a -Wunused-but-set-variable warning. */
+	struct intel_iommu *iommu __maybe_unused;
 	struct device *dev;
 	int i;
 	int ret = 0;
_

Patches currently in -mm which might be from cai@xxxxxx are

iommu-intel-fix-variable-iommu-set-but-not-used.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux