Re: [PATCH 4/4] crypto: ccp - Add SEV_INIT_EX support

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

 



Hi Peter,

I love your patch! Perhaps something to improve:

[auto build test WARNING on herbert-crypto-2.6/master]
[also build test WARNING on linus/master v5.15-rc7]
[cannot apply to herbert-cryptodev-2.6/master next-20211028]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Peter-Gonda/Add-SEV_INIT_EX-support/20211029-020022
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git master
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/aa961b54617e0edd40b4df9d9d159014cabb7953
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Peter-Gonda/Add-SEV_INIT_EX-support/20211029-020022
        git checkout aa961b54617e0edd40b4df9d9d159014cabb7953
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/crypto/ccp/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/crypto/ccp/sev-dev.c:187:68: sparse: sparse: Using plain integer as NULL pointer

vim +187 drivers/crypto/ccp/sev-dev.c

   172	
   173	static int sev_read_nv_memory(void)
   174	{
   175		struct file *fp;
   176		ssize_t nread;
   177	
   178		if (!sev_init_ex_nv_address)
   179			return -EOPNOTSUPP;
   180	
   181		fp = filp_open(init_ex_path, O_RDONLY, 0);
   182		if (IS_ERR(fp)) {
   183			dev_err(psp_master->dev, "sev could not open file for read\n");
   184			return PTR_ERR(fp);
   185		}
   186	
 > 187		nread = kernel_read(fp, sev_init_ex_nv_address, NV_LENGTH, 0);
   188		dev_dbg(psp_master->dev, "sev NV read %d bytes\n", nread);
   189		filp_close(fp, NULL);
   190		return 0;
   191	}
   192	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux