All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ma Ke <make24@iscas.ac.cn>,
	syniurge@gmail.com, shyam-sundar.s-k@amd.com,
	andi.shyti@kernel.org, wsa@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Ma Ke <make24@iscas.ac.cn>,
	stable@vger.kernel.org
Subject: Re: [PATCH] i2c: fix reference leak in MP2 PCI device
Date: Sun, 28 Sep 2025 11:29:32 +0800	[thread overview]
Message-ID: <202509281110.ACsS1CDz-lkp@intel.com> (raw)
In-Reply-To: <20250927105729.19164-1-make24@iscas.ac.cn>

Hi Ma,

kernel test robot noticed the following build warnings:

[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on linus/master v6.17-rc7 next-20250926]
[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/Ma-Ke/i2c-fix-reference-leak-in-MP2-PCI-device/20250927-190047
base:   https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link:    https://lore.kernel.org/r/20250927105729.19164-1-make24%40iscas.ac.cn
patch subject: [PATCH] i2c: fix reference leak in MP2 PCI device
config: i386-randconfig-013-20250928 (https://download.01.org/0day-ci/archive/20250928/202509281110.ACsS1CDz-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250928/202509281110.ACsS1CDz-lkp@intel.com/reproduce)

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/202509281110.ACsS1CDz-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/i2c/busses/i2c-amd-mp2-pci.c: In function 'amd_mp2_find_device':
   drivers/i2c/busses/i2c-amd-mp2-pci.c:467:9: error: 'mp2_dev' undeclared (first use in this function)
     467 |         mp2_dev = (struct amd_mp2_dev *)pci_get_drvdata(pci_dev);
         |         ^~~~~~~
   drivers/i2c/busses/i2c-amd-mp2-pci.c:467:9: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/i2c/busses/i2c-amd-mp2-pci.c:470:1: warning: control reaches end of non-void function [-Wreturn-type]
     470 | }
         | ^


vim +470 drivers/i2c/busses/i2c-amd-mp2-pci.c

529766e0a01144 Elie Morisse     2019-03-05  456  
529766e0a01144 Elie Morisse     2019-03-05  457  struct amd_mp2_dev *amd_mp2_find_device(void)
529766e0a01144 Elie Morisse     2019-03-05  458  {
529766e0a01144 Elie Morisse     2019-03-05  459  	struct device *dev;
529766e0a01144 Elie Morisse     2019-03-05  460  	struct pci_dev *pci_dev;
529766e0a01144 Elie Morisse     2019-03-05  461  
6bf85ba9e55f65 Suzuki K Poulose 2019-07-23  462  	dev = driver_find_next_device(&amd_mp2_pci_driver.driver, NULL);
529766e0a01144 Elie Morisse     2019-03-05  463  	if (!dev)
529766e0a01144 Elie Morisse     2019-03-05  464  		return NULL;
529766e0a01144 Elie Morisse     2019-03-05  465  
529766e0a01144 Elie Morisse     2019-03-05  466  	pci_dev = to_pci_dev(dev);
10a231ddf6f43e Ma Ke            2025-09-27  467  	mp2_dev = (struct amd_mp2_dev *)pci_get_drvdata(pci_dev);
10a231ddf6f43e Ma Ke            2025-09-27  468  	put_device(dev);
10a231ddf6f43e Ma Ke            2025-09-27  469  	return mp2_dev;
529766e0a01144 Elie Morisse     2019-03-05 @470  }
529766e0a01144 Elie Morisse     2019-03-05  471  EXPORT_SYMBOL_GPL(amd_mp2_find_device);
529766e0a01144 Elie Morisse     2019-03-05  472  

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

  parent reply	other threads:[~2025-09-28  3:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-27 10:57 [PATCH] i2c: fix reference leak in MP2 PCI device Ma Ke
2025-09-27 12:56 ` Markus Elfring
2025-09-27 18:08   ` Greg KH
2025-09-28  3:29 ` kernel test robot [this message]
2025-09-28  5:34 ` 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=202509281110.ACsS1CDz-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shyam-sundar.s-k@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=syniurge@gmail.com \
    --cc=wsa@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.