linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/iommu/io-pgtable-dart.c:157:25: warning: variable 'new' set but not used
@ 2023-07-24 14:18 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-07-24 14:18 UTC (permalink / raw)
  To: Mark Rutland; +Cc: oe-kbuild-all, linux-kernel, Kees Cook

Hi Mark,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6eaae198076080886b9e7d57f4ae06fa782f90ef
commit: 9257959a6e5b4fca6fc8e985790bff62c2046f20 locking/atomic: scripts: restructure fallback ifdeffery
date:   7 weeks ago
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20230724/202307242225.d5UjdQao-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230724/202307242225.d5UjdQao-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307242225.d5UjdQao-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/iommu/io-pgtable-dart.c: In function 'dart_install_table':
   drivers/iommu/io-pgtable-dart.c:168:13: error: void value not ignored as it ought to be
     168 |         old = cmpxchg64_relaxed(ptep, curr, new);
         |             ^
>> drivers/iommu/io-pgtable-dart.c:157:25: warning: variable 'new' set but not used [-Wunused-but-set-variable]
     157 |         dart_iopte old, new;
         |                         ^~~


vim +/new +157 drivers/iommu/io-pgtable-dart.c

745ef1092bcfcf Janne Grunau 2022-09-16  151  
745ef1092bcfcf Janne Grunau 2022-09-16  152  static dart_iopte dart_install_table(dart_iopte *table,
745ef1092bcfcf Janne Grunau 2022-09-16  153  					     dart_iopte *ptep,
745ef1092bcfcf Janne Grunau 2022-09-16  154  					     dart_iopte curr,
745ef1092bcfcf Janne Grunau 2022-09-16  155  					     struct dart_io_pgtable *data)
745ef1092bcfcf Janne Grunau 2022-09-16  156  {
745ef1092bcfcf Janne Grunau 2022-09-16 @157  	dart_iopte old, new;
745ef1092bcfcf Janne Grunau 2022-09-16  158  
745ef1092bcfcf Janne Grunau 2022-09-16  159  	new = paddr_to_iopte(__pa(table), data) | APPLE_DART_PTE_VALID;
745ef1092bcfcf Janne Grunau 2022-09-16  160  
745ef1092bcfcf Janne Grunau 2022-09-16  161  	/*
745ef1092bcfcf Janne Grunau 2022-09-16  162  	 * Ensure the table itself is visible before its PTE can be.
745ef1092bcfcf Janne Grunau 2022-09-16  163  	 * Whilst we could get away with cmpxchg64_release below, this
745ef1092bcfcf Janne Grunau 2022-09-16  164  	 * doesn't have any ordering semantics when !CONFIG_SMP.
745ef1092bcfcf Janne Grunau 2022-09-16  165  	 */
745ef1092bcfcf Janne Grunau 2022-09-16  166  	dma_wmb();
745ef1092bcfcf Janne Grunau 2022-09-16  167  
745ef1092bcfcf Janne Grunau 2022-09-16  168  	old = cmpxchg64_relaxed(ptep, curr, new);
745ef1092bcfcf Janne Grunau 2022-09-16  169  
745ef1092bcfcf Janne Grunau 2022-09-16  170  	return old;
745ef1092bcfcf Janne Grunau 2022-09-16  171  }
745ef1092bcfcf Janne Grunau 2022-09-16  172  

:::::: The code at line 157 was first introduced by commit
:::::: 745ef1092bcfcf3bca8d82c260947ca498022dde iommu/io-pgtable: Move Apple DART support to its own file

:::::: TO: Janne Grunau <j@jannau.net>
:::::: CC: Joerg Roedel <jroedel@suse.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/iommu/io-pgtable-dart.c:157:25: warning: variable 'new' set but not used
@ 2023-09-09 11:01 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-09-09 11:01 UTC (permalink / raw)
  To: Mark Rutland; +Cc: oe-kbuild-all, linux-kernel, Kees Cook

Hi Mark,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6099776f9f268e61fe5ecd721f994a8cfce5306f
commit: 9257959a6e5b4fca6fc8e985790bff62c2046f20 locking/atomic: scripts: restructure fallback ifdeffery
date:   3 months ago
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20230909/202309091804.8DRVOiw1-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230909/202309091804.8DRVOiw1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309091804.8DRVOiw1-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/iommu/io-pgtable-dart.c: In function 'dart_install_table':
   drivers/iommu/io-pgtable-dart.c:168:13: error: void value not ignored as it ought to be
     168 |         old = cmpxchg64_relaxed(ptep, curr, new);
         |             ^
>> drivers/iommu/io-pgtable-dart.c:157:25: warning: variable 'new' set but not used [-Wunused-but-set-variable]
     157 |         dart_iopte old, new;
         |                         ^~~


vim +/new +157 drivers/iommu/io-pgtable-dart.c

745ef1092bcfcf Janne Grunau 2022-09-16  151  
745ef1092bcfcf Janne Grunau 2022-09-16  152  static dart_iopte dart_install_table(dart_iopte *table,
745ef1092bcfcf Janne Grunau 2022-09-16  153  					     dart_iopte *ptep,
745ef1092bcfcf Janne Grunau 2022-09-16  154  					     dart_iopte curr,
745ef1092bcfcf Janne Grunau 2022-09-16  155  					     struct dart_io_pgtable *data)
745ef1092bcfcf Janne Grunau 2022-09-16  156  {
745ef1092bcfcf Janne Grunau 2022-09-16 @157  	dart_iopte old, new;
745ef1092bcfcf Janne Grunau 2022-09-16  158  
745ef1092bcfcf Janne Grunau 2022-09-16  159  	new = paddr_to_iopte(__pa(table), data) | APPLE_DART_PTE_VALID;
745ef1092bcfcf Janne Grunau 2022-09-16  160  
745ef1092bcfcf Janne Grunau 2022-09-16  161  	/*
745ef1092bcfcf Janne Grunau 2022-09-16  162  	 * Ensure the table itself is visible before its PTE can be.
745ef1092bcfcf Janne Grunau 2022-09-16  163  	 * Whilst we could get away with cmpxchg64_release below, this
745ef1092bcfcf Janne Grunau 2022-09-16  164  	 * doesn't have any ordering semantics when !CONFIG_SMP.
745ef1092bcfcf Janne Grunau 2022-09-16  165  	 */
745ef1092bcfcf Janne Grunau 2022-09-16  166  	dma_wmb();
745ef1092bcfcf Janne Grunau 2022-09-16  167  
745ef1092bcfcf Janne Grunau 2022-09-16  168  	old = cmpxchg64_relaxed(ptep, curr, new);
745ef1092bcfcf Janne Grunau 2022-09-16  169  
745ef1092bcfcf Janne Grunau 2022-09-16  170  	return old;
745ef1092bcfcf Janne Grunau 2022-09-16  171  }
745ef1092bcfcf Janne Grunau 2022-09-16  172  

:::::: The code at line 157 was first introduced by commit
:::::: 745ef1092bcfcf3bca8d82c260947ca498022dde iommu/io-pgtable: Move Apple DART support to its own file

:::::: TO: Janne Grunau <j@jannau.net>
:::::: CC: Joerg Roedel <jroedel@suse.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-09 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24 14:18 drivers/iommu/io-pgtable-dart.c:157:25: warning: variable 'new' set but not used kernel test robot
2023-09-09 11:01 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).