linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 8282/13104] arch/s390/kvm/pci.c:58:68: sparse: sparse: Using plain integer as NULL pointer
@ 2022-07-27 11:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-27 11:31 UTC (permalink / raw)
  To: Matthew Rosato
  Cc: kbuild-all, Linux Memory Management List, Christian Borntraeger

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   058affafc65a74cf54499fb578b66ad0b18f939b
commit: 98b1d33dac5fd09060486762c02fd1a78baeb1e0 [8282/13104] KVM: s390: pci: do initial setup for AEN interpretation
config: s390-randconfig-s051-20220727 (https://download.01.org/0day-ci/archive/20220727/202207271954.IctLQQYT-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=98b1d33dac5fd09060486762c02fd1a78baeb1e0
        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 98b1d33dac5fd09060486762c02fd1a78baeb1e0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash arch/s390/kvm/

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

sparse warnings: (new ones prefixed by >>)
>> arch/s390/kvm/pci.c:58:68: sparse: sparse: Using plain integer as NULL pointer

vim +58 arch/s390/kvm/pci.c

    48	
    49	static int zpci_setup_aipb(u8 nisc)
    50	{
    51		struct page *page;
    52		int size, rc;
    53	
    54		zpci_aipb = kzalloc(sizeof(union zpci_sic_iib), GFP_KERNEL);
    55		if (!zpci_aipb)
    56			return -ENOMEM;
    57	
  > 58		aift->sbv = airq_iv_create(ZPCI_NR_DEVICES, AIRQ_IV_ALLOC, 0);
    59		if (!aift->sbv) {
    60			rc = -ENOMEM;
    61			goto free_aipb;
    62		}
    63		zpci_aif_sbv = aift->sbv;
    64		size = get_order(PAGE_ALIGN(ZPCI_NR_DEVICES *
    65							sizeof(struct zpci_gaite)));
    66		page = alloc_pages(GFP_KERNEL | __GFP_ZERO, size);
    67		if (!page) {
    68			rc = -ENOMEM;
    69			goto free_sbv;
    70		}
    71		aift->gait = (struct zpci_gaite *)page_to_phys(page);
    72	
    73		zpci_aipb->aipb.faisb = virt_to_phys(aift->sbv->vector);
    74		zpci_aipb->aipb.gait = virt_to_phys(aift->gait);
    75		zpci_aipb->aipb.afi = nisc;
    76		zpci_aipb->aipb.faal = ZPCI_NR_DEVICES;
    77	
    78		/* Setup Adapter Event Notification Interpretation */
    79		if (zpci_set_irq_ctrl(SIC_SET_AENI_CONTROLS, 0, zpci_aipb)) {
    80			rc = -EIO;
    81			goto free_gait;
    82		}
    83	
    84		return 0;
    85	
    86	free_gait:
    87		free_pages((unsigned long)aift->gait, size);
    88	free_sbv:
    89		airq_iv_release(aift->sbv);
    90		zpci_aif_sbv = NULL;
    91	free_aipb:
    92		kfree(zpci_aipb);
    93		zpci_aipb = NULL;
    94	
    95		return rc;
    96	}
    97	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


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

only message in thread, other threads:[~2022-07-27 11:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 11:31 [linux-next:master 8282/13104] arch/s390/kvm/pci.c:58:68: sparse: sparse: Using plain integer as NULL pointer 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