linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 9016/14891] drivers/virt/nitro_enclaves/ne_misc_dev.c:1511:14: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-10-13 21:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-13 21:18 UTC (permalink / raw)
  To: Andra Paraschiv
  Cc: kbuild-all, Linux Memory Management List, Greg Kroah-Hartman,
	Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 3668 bytes --]

Hi Andra,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f2fb1afc57304f9dd68c20a08270e287470af2eb
commit: 0f5c7b7484394e26afc07c063290fb43c4ba42c7 [9016/14891] nitro_enclaves: Add Makefile for the Nitro Enclaves driver
config: i386-randconfig-s001-20201014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-rc1-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0f5c7b7484394e26afc07c063290fb43c4ba42c7
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 0f5c7b7484394e26afc07c063290fb43c4ba42c7
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> drivers/virt/nitro_enclaves/ne_misc_dev.c:1511:14: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __poll_t [usertype] mask @@     got int @@
>> drivers/virt/nitro_enclaves/ne_misc_dev.c:1511:14: sparse:     expected restricted __poll_t [usertype] mask
>> drivers/virt/nitro_enclaves/ne_misc_dev.c:1511:14: sparse:     got int

vim +1511 drivers/virt/nitro_enclaves/ne_misc_dev.c

9c8eb50fe9e2bb Andra Paraschiv 2020-09-21  1491  
38907e124088b2 Andra Paraschiv 2020-09-21  1492  /**
38907e124088b2 Andra Paraschiv 2020-09-21  1493   * ne_enclave_poll() - Poll functionality used for enclave out-of-band events.
38907e124088b2 Andra Paraschiv 2020-09-21  1494   * @file:	File associated with this poll function.
38907e124088b2 Andra Paraschiv 2020-09-21  1495   * @wait:	Poll table data structure.
38907e124088b2 Andra Paraschiv 2020-09-21  1496   *
38907e124088b2 Andra Paraschiv 2020-09-21  1497   * Context: Process context.
38907e124088b2 Andra Paraschiv 2020-09-21  1498   * Return:
38907e124088b2 Andra Paraschiv 2020-09-21  1499   * * Poll mask.
38907e124088b2 Andra Paraschiv 2020-09-21  1500   */
38907e124088b2 Andra Paraschiv 2020-09-21  1501  static __poll_t ne_enclave_poll(struct file *file, poll_table *wait)
38907e124088b2 Andra Paraschiv 2020-09-21  1502  {
38907e124088b2 Andra Paraschiv 2020-09-21  1503  	__poll_t mask = 0;
38907e124088b2 Andra Paraschiv 2020-09-21  1504  	struct ne_enclave *ne_enclave = file->private_data;
38907e124088b2 Andra Paraschiv 2020-09-21  1505  
38907e124088b2 Andra Paraschiv 2020-09-21  1506  	poll_wait(file, &ne_enclave->eventq, wait);
38907e124088b2 Andra Paraschiv 2020-09-21  1507  
38907e124088b2 Andra Paraschiv 2020-09-21  1508  	if (!ne_enclave->has_event)
38907e124088b2 Andra Paraschiv 2020-09-21  1509  		return mask;
38907e124088b2 Andra Paraschiv 2020-09-21  1510  
38907e124088b2 Andra Paraschiv 2020-09-21 @1511  	mask = POLLHUP;
38907e124088b2 Andra Paraschiv 2020-09-21  1512  
38907e124088b2 Andra Paraschiv 2020-09-21  1513  	return mask;
38907e124088b2 Andra Paraschiv 2020-09-21  1514  }
38907e124088b2 Andra Paraschiv 2020-09-21  1515  

:::::: The code at line 1511 was first introduced by commit
:::::: 38907e124088b2f5b176acdf3d89926c09d3206a nitro_enclaves: Add logic for creating an enclave VM

:::::: TO: Andra Paraschiv <andraprs@amazon.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36223 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-13 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-13 21:18 [linux-next:master 9016/14891] drivers/virt/nitro_enclaves/ne_misc_dev.c:1511:14: sparse: sparse: incorrect type in assignment (different base types) 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).