lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202501292144.eFDq4ovr-lkp@intel.com>
Date: Wed, 29 Jan 2025 22:02:59 +0800
From: kernel test robot <lkp@...el.com>
To: Even Xu <even.xu@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Jiri Kosina <jikos@...nel.org>, Xinpeng Sun <xinpeng.sun@...el.com>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	Mark Pearson <mpearson-lenovo@...ebb.ca>
Subject: drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c:298:38: sparse:
 sparse: dubious: !x | !y

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   05dbaf8dd8bf537d4b4eb3115ab42a5fb40ff1f5
commit: a688404b2e20f00cce6d0a2b888ef4ca9154e144 HID: intel-thc-hid: intel-thc: Add THC DMA interfaces
date:   3 weeks ago
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250129/202501292144.eFDq4ovr-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250129/202501292144.eFDq4ovr-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501292144.eFDq4ovr-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c:298:38: sparse: sparse: dubious: !x | !y
   drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/mm.h, ...):
   include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false
   include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false

vim +298 drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c

   287	
   288	static void release_dma_buffers(struct thc_device *dev,
   289					struct thc_dma_configuration *config)
   290	{
   291		size_t prd_tbls_size = array_size(PRD_TABLE_SIZE, config->prd_tbl_num);
   292		unsigned int i;
   293	
   294		if (!config->is_enabled)
   295			return;
   296	
   297		for (i = 0; i < config->prd_tbl_num; i++) {
 > 298			if (!config->sgls[i] | !config->sgls_nent[i])
   299				continue;
   300	
   301			dma_unmap_sg(dev->dev, config->sgls[i],
   302				     config->sgls_nent[i],
   303				     config->dir);
   304	
   305			sgl_free(config->sgls[i]);
   306			config->sgls[i] = NULL;
   307		}
   308	
   309		memset(config->prd_tbls, 0, prd_tbls_size);
   310	
   311		if (config->prd_tbls) {
   312			dma_free_coherent(dev->dev, prd_tbls_size, config->prd_tbls,
   313					  config->prd_tbls_dma_handle);
   314			config->prd_tbls = NULL;
   315			config->prd_tbls_dma_handle = 0;
   316		}
   317	}
   318	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ