mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ma Ke <make24@iscas.ac.cn>,
	vkoul@kernel.org, kishon@kernel.org,
	andriy.shevchenko@linux.intel.com, mchehab+huawei@kernel.org,
	mani@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] phy: HiSilicon: Fix error handling in hi3670_pcie_get_resources_from_pcie
Date: Mon, 17 Nov 2025 06:38:24 +0800	[thread overview]
Message-ID: <202511170524.sEQYJ4MB-lkp@intel.com> (raw)
In-Reply-To: <20251116073231.22676-1-make24@iscas.ac.cn>

Hi Ma,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.18-rc5 next-20251114]
[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/phy-HiSilicon-Fix-error-handling-in-hi3670_pcie_get_resources_from_pcie/20251116-153458
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20251116073231.22676-1-make24%40iscas.ac.cn
patch subject: [PATCH] phy: HiSilicon: Fix error handling in hi3670_pcie_get_resources_from_pcie
config: m68k-randconfig-r072-20251117 (https://download.01.org/0day-ci/archive/20251117/202511170524.sEQYJ4MB-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/202511170524.sEQYJ4MB-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/202511170524.sEQYJ4MB-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/phy/hisilicon/phy-hi3670-pcie.c: In function 'hi3670_pcie_get_resources_from_pcie':
>> drivers/phy/hisilicon/phy-hi3670-pcie.c:564:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     564 |  int ret = 0;
         |      ^~~


vim +/ret +564 drivers/phy/hisilicon/phy-hi3670-pcie.c

   558	
   559	static int hi3670_pcie_get_resources_from_pcie(struct hi3670_pcie_phy *phy)
   560	{
   561		struct device_node *pcie_port;
   562		struct device *dev = phy->dev;
   563		struct device *pcie_dev = NULL;
 > 564		int ret = 0;
   565	
   566		pcie_port = of_get_child_by_name(dev->parent->of_node, "pcie");
   567		if (!pcie_port) {
   568			dev_err(dev, "no pcie node found in %s\n",
   569				dev->parent->of_node->full_name);
   570			return -ENODEV;
   571		}
   572	
   573		pcie_dev = bus_find_device_by_of_node(&platform_bus_type, pcie_port);
   574		if (!pcie_dev) {
   575			dev_err(dev, "Didn't find pcie device\n");
   576			ret = -ENODEV;
   577			goto out_put_node;
   578		}
   579	
   580		/*
   581		 * We might just use NULL instead of the APB name, as the
   582		 * pcie-kirin currently registers directly just one regmap (although
   583		 * the DWC driver register other regmaps).
   584		 *
   585		 * Yet, it sounds safer to warrant that it will be accessing the
   586		 * right regmap. So, let's use the named version.
   587		 */
   588		phy->apb = dev_get_regmap(pcie_dev, "kirin_pcie_apb");
   589		if (!phy->apb) {
   590			dev_err(dev, "Failed to get APB regmap\n");
   591			ret = -ENODEV;
   592			goto out_put_device;
   593		}
   594	
   595	out_put_device:
   596		put_device(pcie_dev);
   597	out_put_node:
   598		of_node_put(pcie_port);
   599		return 0;
   600	}
   601	

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

      reply	other threads:[~2025-11-16 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-16  7:32 Ma Ke
2025-11-16 22:38 ` kernel test robot [this message]

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=202511170524.sEQYJ4MB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=make24@iscas.ac.cn \
    --cc=mani@kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®