All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wathsala Vithanage <wathsala.vithanage@arm.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 2/2] PCI: Add generic netlink interface to TPH _DSM
Date: Tue, 7 Jan 2025 19:03:33 +0800	[thread overview]
Message-ID: <202501071830.yBofLC9n-lkp@intel.com> (raw)
In-Reply-To: <20250106163045.508959-3-wathsala.vithanage@arm.com>

Hi Wathsala,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge pci/next pci/for-linus linus/master v6.13-rc6 next-20250107]
[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/Wathsala-Vithanage/ACPI-Add-support-for-invoking-select-_DSM-methods-from-user-space/20250107-003201
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20250106163045.508959-3-wathsala.vithanage%40arm.com
patch subject: [RFC PATCH 2/2] PCI: Add generic netlink interface to TPH _DSM
config: loongarch-randconfig-002-20250107 (https://download.01.org/0day-ci/archive/20250107/202501071830.yBofLC9n-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250107/202501071830.yBofLC9n-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/202501071830.yBofLC9n-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pci/tph.c: In function 'tph_invoke_dsm_genl_cb':
>> drivers/pci/tph.c:169:13: warning: variable 'cpu_uid' set but not used [-Wunused-but-set-variable]
     169 |         u32 cpu_uid;
         |             ^~~~~~~


vim +/cpu_uid +169 drivers/pci/tph.c

   163	
   164	static int tph_invoke_dsm_genl_cb(struct acpi_genl_dsm_id *in,
   165					  struct acpi_genl_dsm_id *out)
   166	{
   167		struct pci_dev *pdev, *pdev_rp;
   168		acpi_handle handle;
 > 169		u32 cpu_uid;
   170		int status = 0;
   171	
   172		struct tph_genl_dsm_info *arg = (struct tph_genl_dsm_info *)in;
   173		struct tph_genl_dsm_info *ret = (struct tph_genl_dsm_info *)out;
   174	
   175		/* Honor  notph and acpi kernel parameters */
   176		if (acpi_disabled || acpi_pci_disabled || pci_tph_disabled) {
   177			status = -EINVAL;
   178			goto out;
   179		}
   180	
   181		/*
   182		 * pkg_arg1 contains the kernel logical CPU id provided by the user,
   183		 * make sure it's a valid CPU id before passing it to down to firmware.
   184		 * pkg_arg2 is not use by tph_invoke_dsm, hence no validation is
   185		 * required.
   186		 */
   187		if (!(arg->info.arg.pkg_arg1 < nr_cpu_ids &&
   188		    cpu_present(arg->info.arg.pkg_arg1))) {
   189			status = -EINVAL;
   190			goto out;
   191		}
   192	
   193		cpu_uid = topology_core_id(arg->info.arg.pkg_arg1);
   194	
   195		ret->id.guid = pci_acpi_dsm_guid;
   196		ret->id.rev = 7;
   197		ret->id.func = TPH_ST_DSM_FUNC_INDEX;
   198	
   199		pdev = pci_get_domain_bus_and_slot(arg->info.arg.bus, arg->info.arg.dev,
   200						   arg->info.arg.devfn);
   201		if (!pdev) {
   202			status = -ENODEV;
   203			goto out;
   204		}
   205	
   206		pdev_rp = pcie_find_root_port(pdev);
   207		if (!pdev_rp || !pdev_rp->bus || !pdev_rp->bus->bridge) {
   208			status = -ENODEV;
   209			goto out;
   210		}
   211	
   212		handle = ACPI_HANDLE(pdev_rp->bus->bridge);
   213	
   214		if (tph_invoke_dsm(handle, arg->info.arg.pkg_arg1, &ret->info.ret.st) !=
   215				   AE_OK) {
   216			status = -EOPNOTSUPP;
   217			goto out;
   218		}
   219	out:
   220		ret->info.ret.status = status;
   221		return 0;
   222	}
   223	

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

  reply	other threads:[~2025-01-07 11:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 16:30 [RFC 0/2] GENL interface for ACPI _DSM methods Wathsala Vithanage
2025-01-06 16:30 ` [RFC PATCH 1/2] ACPI: Add support for invoking select _DSM methods from user space Wathsala Vithanage
2025-01-07  8:57   ` kernel test robot
2025-01-06 16:30 ` [RFC PATCH 2/2] PCI: Add generic netlink interface to TPH _DSM Wathsala Vithanage
2025-01-07 11:03   ` kernel test robot [this message]
2025-01-06 18:01 ` [RFC 0/2] GENL interface for ACPI _DSM methods Jonathan Cameron
2025-01-07 17:37   ` Jeremy Linton
2025-01-07 17:48     ` Jason Gunthorpe
2025-01-08 19:59       ` Jeremy Linton
2025-01-08 20:50         ` Jason Gunthorpe
2025-01-09  0:34           ` Wathsala Wathawana Vithanage
2025-01-09 13:38             ` Jason Gunthorpe
2025-01-09 13:42               ` Wathsala Wathawana Vithanage
2025-01-09 13:46                 ` Jason Gunthorpe

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=202501071830.yBofLC9n-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wathsala.vithanage@arm.com \
    /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.