Re: [PATCH v9 25/40] sg: replace rq array with lists

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

 



Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[cannot apply to scsi/for-next linus/master v5.7-rc2 next-20200424]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20200423-165610
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-191-gc51a0382-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:417:9: sparse: sparse: preprocessor token offsetof redefined
   include/linux/stddef.h:17:9: sparse: this was the original definition
>> drivers/scsi/sg.c:2889:20: sparse: sparse: incorrect type in initializer (different base types) @@    expected int gfp @@    got restricted gfp_t [usertyint gfp @@
>> drivers/scsi/sg.c:2889:20: sparse:    expected int gfp
>> drivers/scsi/sg.c:2889:20: sparse:    got restricted gfp_t [usertype]
>> drivers/scsi/sg.c:2892:51: sparse: sparse: restricted gfp_t degrades to integer
>> drivers/scsi/sg.c:2892:49: sparse: sparse: incorrect type in argument 2 (different base types) @@    expected restricted gfp_t [usertype] flags @@    got  [usertype] flags @@
>> drivers/scsi/sg.c:2892:49: sparse:    expected restricted gfp_t [usertype] flags
>> drivers/scsi/sg.c:2892:49: sparse:    got unsigned int
   drivers/scsi/sg.c:2894:51: sparse: sparse: restricted gfp_t degrades to integer
   drivers/scsi/sg.c:2894:49: sparse: sparse: incorrect type in argument 2 (different base types) @@    expected restricted gfp_t [usertype] flags @@    got  [usertype] flags @@
   drivers/scsi/sg.c:2894:49: sparse:    expected restricted gfp_t [usertype] flags
   drivers/scsi/sg.c:2894:49: sparse:    got unsigned int

vim +2889 drivers/scsi/sg.c

  2878	
  2879	/*
  2880	 * Makes a new sg_request object. If 'first' is set then use GFP_KERNEL which
  2881	 * may take time but has improved chance of success, otherwise use GFP_ATOMIC.
  2882	 * Note that basic initialization is done but srp is not added to either sfp
  2883	 * list. On error returns twisted negated errno value (not NULL).
  2884	 */
  2885	static struct sg_request *
  2886	sg_mk_srp(struct sg_fd *sfp, bool first)
  2887	{
  2888		struct sg_request *srp;
> 2889		int gfp =  __GFP_NOWARN;
  2890	
  2891		if (first)      /* prepared to wait if none already outstanding */
> 2892			srp = kzalloc(sizeof(*srp), gfp | GFP_KERNEL);
  2893		else
  2894			srp = kzalloc(sizeof(*srp), gfp | GFP_ATOMIC);
  2895		if (srp) {
  2896			atomic_set(&srp->rq_st, SG_RS_INACTIVE);
  2897			srp->parentfp = sfp;
  2898			return srp;
  2899		} else {
  2900			return ERR_PTR(-ENOMEM);
  2901		}
  2902	}
  2903	

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux