[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008252124.wO0XX6AA%lkp@intel.com>
Date: Tue, 25 Aug 2020 21:58:28 +0800
From: kernel test robot <lkp@...el.com>
To: Maxime Ripard <maxime@...no.tech>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Joerg Roedel <jroedel@...e.de>
Subject: drivers/iommu/sun50i-iommu.c:890:14: warning: variable 'iova' set
but not used
Hi Maxime,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a
commit: 4100b8c229b328358cc4a82f5042dbf22f1c1ccb iommu: Add Allwinner H6 IOMMU driver
date: 3 months ago
config: i386-randconfig-r015-20200825 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 4100b8c229b328358cc4a82f5042dbf22f1c1ccb
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/iommu/sun50i-iommu.c: In function 'sun50i_dte_get_page_table':
drivers/iommu/sun50i-iommu.c:486:16: warning: unused variable 'flags' [-Wunused-variable]
486 | unsigned long flags;
| ^~~~~
drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_unmap':
drivers/iommu/sun50i-iommu.c:561:13: warning: variable 'pte_dma' set but not used [-Wunused-but-set-variable]
561 | dma_addr_t pte_dma;
| ^~~~~~~
drivers/iommu/sun50i-iommu.c:559:23: warning: unused variable 'iommu' [-Wunused-variable]
559 | struct sun50i_iommu *iommu = sun50i_domain->iommu;
| ^~~~~
drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_probe_device':
drivers/iommu/sun50i-iommu.c:749:22: warning: unused variable 'group' [-Wunused-variable]
749 | struct iommu_group *group;
| ^~~~~
drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_irq':
>> drivers/iommu/sun50i-iommu.c:890:14: warning: variable 'iova' set but not used [-Wunused-but-set-variable]
890 | phys_addr_t iova;
| ^~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4100b8c229b328358cc4a82f5042dbf22f1c1ccb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4100b8c229b328358cc4a82f5042dbf22f1c1ccb
vim +/iova +890 drivers/iommu/sun50i-iommu.c
886
887 static irqreturn_t sun50i_iommu_irq(int irq, void *dev_id)
888 {
889 struct sun50i_iommu *iommu = dev_id;
> 890 phys_addr_t iova;
891 u32 status;
892
893 spin_lock(&iommu->iommu_lock);
894
895 status = iommu_read(iommu, IOMMU_INT_STA_REG);
896 if (!(status & IOMMU_INT_MASK)) {
897 spin_unlock(&iommu->iommu_lock);
898 return IRQ_NONE;
899 }
900
901 if (status & IOMMU_INT_INVALID_L2PG)
902 iova = sun50i_iommu_handle_pt_irq(iommu,
903 IOMMU_INT_ERR_ADDR_L2_REG,
904 IOMMU_L2PG_INT_REG);
905 else if (status & IOMMU_INT_INVALID_L1PG)
906 iova = sun50i_iommu_handle_pt_irq(iommu,
907 IOMMU_INT_ERR_ADDR_L1_REG,
908 IOMMU_L1PG_INT_REG);
909 else
910 iova = sun50i_iommu_handle_perm_irq(iommu);
911
912 iommu_write(iommu, IOMMU_INT_CLR_REG, status);
913
914 iommu_write(iommu, IOMMU_RESET_REG, ~status);
915 iommu_write(iommu, IOMMU_RESET_REG, status);
916
917 spin_unlock(&iommu->iommu_lock);
918
919 return IRQ_HANDLED;
920 }
921
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (43990 bytes)
Powered by blists - more mailing lists