linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gerhard Engleder <gerhard@engleder-embedded.com>,
	linux-i2c@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, andi.shyti@kernel.org,
	arnd@arndb.de, gregkh@linuxfoundation.org,
	Gerhard Engleder <gerhard@engleder-embedded.com>
Subject: Re: [PATCH 2/2] misc: keba: Add basic KEBA CP500 system FPGA support
Date: Mon, 3 Jun 2024 07:37:57 +0800	[thread overview]
Message-ID: <202406030714.6PytC3El-lkp@intel.com> (raw)
In-Reply-To: <20240601192846.68146-3-gerhard@engleder-embedded.com>

Hi Gerhard,

kernel test robot noticed the following build warnings:

[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus soc/for-next linus/master v6.10-rc1 next-20240531]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Gerhard-Engleder/i2c-keba-Add-KEBA-I2C-controller-support/20240602-040548
base:   git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link:    https://lore.kernel.org/r/20240601192846.68146-3-gerhard%40engleder-embedded.com
patch subject: [PATCH 2/2] misc: keba: Add basic KEBA CP500 system FPGA support
config: s390-randconfig-r062-20240603 (https://download.01.org/0day-ci/archive/20240603/202406030714.6PytC3El-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406030714.6PytC3El-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/misc/keba/cp500.c:324:14-15: WARNING comparing pointer to 0

vim +324 drivers/misc/keba/cp500.c

   313	
   314	static int cp500_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
   315	{
   316		struct device *dev = &pci_dev->dev;
   317		struct resource startup;
   318		struct cp500 *cp500;
   319		u32 cp500_vers;
   320		char buf[64];
   321		int ret;
   322	
   323		cp500 = devm_kzalloc(dev, sizeof(*cp500), GFP_KERNEL);
 > 324		if (cp500 == 0)
   325			return -ENOMEM;
   326		cp500->pci_dev = pci_dev;
   327		cp500->sys_hwbase = pci_resource_start(pci_dev, CP500_SYS_BAR);
   328		cp500->ecm_hwbase = pci_resource_start(pci_dev, CP500_ECM_BAR);
   329		if (!cp500->sys_hwbase || !cp500->ecm_hwbase)
   330			return -ENODEV;
   331	
   332		if (CP500_IS_CP035(cp500))
   333			cp500->devs = &cp035_devices;
   334		else if (CP500_IS_CP505(cp500))
   335			cp500->devs = &cp505_devices;
   336		else if (CP500_IS_CP520(cp500))
   337			cp500->devs = &cp520_devices;
   338		else
   339			return -ENODEV;
   340	
   341		ret = pci_enable_device(pci_dev);
   342		if (ret)
   343			return ret;
   344		pci_set_master(pci_dev);
   345	
   346		startup = *pci_resource_n(pci_dev, CP500_SYS_BAR);
   347		startup.end = startup.start + cp500->devs->startup.size - 1;
   348		cp500->system_startup_addr = devm_ioremap_resource(&pci_dev->dev,
   349								   &startup);
   350		if (IS_ERR(cp500->system_startup_addr)) {
   351			ret = PTR_ERR(cp500->system_startup_addr);
   352			goto out_disable;
   353		}
   354	
   355		cp500->msix_num = pci_alloc_irq_vectors(pci_dev, CP500_NUM_MSIX_NO_MMI,
   356							CP500_NUM_MSIX, PCI_IRQ_MSIX);
   357		if (cp500->msix_num < CP500_NUM_MSIX_NO_MMI) {
   358			dev_err(&pci_dev->dev,
   359				"Hardware does not support enough MSI-X interrupts\n");
   360			ret = -ENODEV;
   361			goto out_disable;
   362		}
   363	
   364		cp500_vers = ioread32(cp500->system_startup_addr + CP500_VERSION_REG);
   365		cp500->version.major = (cp500_vers & 0xff);
   366		cp500->version.minor = (cp500_vers >> 8) & 0xff;
   367		cp500->version.build = (cp500_vers >> 16) & 0xffff;
   368		cp500_get_fpga_version(cp500, buf, sizeof(buf));
   369	
   370		dev_info(&pci_dev->dev, "FPGA version %s", buf);
   371	
   372		pci_set_drvdata(pci_dev, cp500);
   373	
   374		ret = sysfs_create_group(&pci_dev->dev.kobj, &attrs_group);
   375		if (ret != 0)
   376			goto out_free_irq;
   377	
   378		ret = cp500_enable(cp500);
   379		if (ret != 0)
   380			goto out_remove_group;
   381	
   382		cp500_register_platform_devs(cp500);
   383	
   384		return 0;
   385	
   386	out_remove_group:
   387		sysfs_remove_group(&pci_dev->dev.kobj, &attrs_group);
   388	out_free_irq:
   389		pci_free_irq_vectors(pci_dev);
   390	out_disable:
   391		pci_clear_master(pci_dev);
   392		pci_disable_device(pci_dev);
   393	
   394		return ret;
   395	}
   396	

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

  parent reply	other threads:[~2024-06-02 23:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-01 19:28 [PATCH 0/2] I2C controller support for KEBA PLCs Gerhard Engleder
2024-06-01 19:28 ` [PATCH 1/2] i2c: keba: Add KEBA I2C controller support Gerhard Engleder
2024-06-01 22:52   ` kernel test robot
2024-06-01 23:45   ` kernel test robot
2024-06-02 21:41   ` kernel test robot
2024-06-03 22:37   ` Andi Shyti
2024-06-04 19:06     ` Gerhard Engleder
2024-06-03 23:00   ` kernel test robot
2024-06-01 19:28 ` [PATCH 2/2] misc: keba: Add basic KEBA CP500 system FPGA support Gerhard Engleder
2024-06-02  7:19   ` Greg KH
2024-06-02 18:59     ` Gerhard Engleder
2024-06-02 23:37   ` kernel test robot [this message]
2024-06-04  5:13   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202406030714.6PytC3El-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=arnd@arndb.de \
    --cc=gerhard@engleder-embedded.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).