From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: kernel test robot <lkp@intel.com>
Cc: Huaisheng Ye <huaisheng.ye@intel.com>, <dan.j.williams@intel.com>,
<dave.jiang@intel.com>, <ming.li@zohomail.com>,
<oe-kbuild-all@lists.linux.dev>, <pei.p.jia@intel.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v4 1/1] cxl/core/regs: Refactor out functions to count regblocks of given type
Date: Wed, 15 Jan 2025 13:34:37 +0000 [thread overview]
Message-ID: <20250115133437.00003240@huawei.com> (raw)
In-Reply-To: <202501142243.PmkW84KY-lkp@intel.com>
On Tue, 14 Jan 2025 23:03:17 +0800
kernel test robot <lkp@intel.com> wrote:
> Hi Huaisheng,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on cxl/next]
> [also build test WARNING on linus/master v6.13-rc7 next-20250114]
> [cannot apply to cxl/pending]
> [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/Huaisheng-Ye/cxl-core-regs-Refactor-out-functions-to-count-regblocks-of-given-type/20250114-212025
> base: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git next
> patch link: https://lore.kernel.org/r/20250114131041.17512-2-huaisheng.ye%40intel.com
> patch subject: [PATCH v4 1/1] cxl/core/regs: Refactor out functions to count regblocks of given type
> config: i386-buildonly-randconfig-001-20250114 (https://download.01.org/0day-ci/archive/20250114/202501142243.PmkW84KY-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250114/202501142243.PmkW84KY-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/202501142243.PmkW84KY-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/cxl/core/regs.c:303: warning: Function parameter or struct member 'pdev' not described in '__cxl_find_regblock_instance'
> >> drivers/cxl/core/regs.c:303: warning: Function parameter or struct member 'type' not described in '__cxl_find_regblock_instance'
> >> drivers/cxl/core/regs.c:303: warning: Function parameter or struct member 'map' not described in '__cxl_find_regblock_instance'
> >> drivers/cxl/core/regs.c:303: warning: Function parameter or struct member 'index' not described in '__cxl_find_regblock_instance'
>
As you've probably gathered from this, kernel-doc needs to be complete.
I'd just drop the extra *. This isn't stuff we need outside of someone
reading the actual code.
/*
* __cxl_find_....
>
> vim +303 drivers/cxl/core/regs.c
>
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 291
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 292 /**
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 293 * __cxl_find_regblock_instance() - Locate a register block or count instances by type / index
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 294 * Use CXL_INSTANCES_COUNT for @index if counting instances.
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 295 *
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 296 * __cxl_find_regblock_instance() may return:
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 297 * 0 - if register block enumerated.
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 298 * >= 0 - if counting instances.
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 299 * < 0 - error code otherwise.
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 300 */
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 301 static int __cxl_find_regblock_instance(struct pci_dev *pdev, enum cxl_regloc_type type,
> d717d7f3df1849 Jonathan Cameron 2023-05-26 302 struct cxl_register_map *map, int index)
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 @303 {
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 304 u32 regloc_size, regblocks;
> d717d7f3df1849 Jonathan Cameron 2023-05-26 305 int instance = 0;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 306 int regloc, i;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 307
> 573408049b7598 Robert Richter 2023-06-22 308 *map = (struct cxl_register_map) {
> dd22581f895371 Robert Richter 2023-10-18 309 .host = &pdev->dev,
> 573408049b7598 Robert Richter 2023-06-22 310 .resource = CXL_RESOURCE_NONE,
> 573408049b7598 Robert Richter 2023-06-22 311 };
> 573408049b7598 Robert Richter 2023-06-22 312
> 962f1e79e7acfb Dave Jiang 2024-05-02 313 regloc = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 314 CXL_DVSEC_REG_LOCATOR);
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 315 if (!regloc)
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 316 return -ENXIO;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 317
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 318 pci_read_config_dword(pdev, regloc + PCI_DVSEC_HEADER1, ®loc_size);
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 319 regloc_size = FIELD_GET(PCI_DVSEC_HEADER1_LENGTH_MASK, regloc_size);
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 320
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 321 regloc += CXL_DVSEC_REG_LOCATOR_BLOCK1_OFFSET;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 322 regblocks = (regloc_size - CXL_DVSEC_REG_LOCATOR_BLOCK1_OFFSET) / 8;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 323
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 324 for (i = 0; i < regblocks; i++, regloc += 8) {
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 325 u32 reg_lo, reg_hi;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 326
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 327 pci_read_config_dword(pdev, regloc, ®_lo);
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 328 pci_read_config_dword(pdev, regloc + 4, ®_hi);
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 329
> 6c7f4f1e51c2a2 Dan Williams 2022-11-29 330 if (!cxl_decode_regblock(pdev, reg_lo, reg_hi, map))
> 6c7f4f1e51c2a2 Dan Williams 2022-11-29 331 continue;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 332
> d717d7f3df1849 Jonathan Cameron 2023-05-26 333 if (map->reg_type == type) {
> d717d7f3df1849 Jonathan Cameron 2023-05-26 334 if (index == instance)
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 335 return 0;
> d717d7f3df1849 Jonathan Cameron 2023-05-26 336 instance++;
> d717d7f3df1849 Jonathan Cameron 2023-05-26 337 }
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 338 }
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 339
> 6c7f4f1e51c2a2 Dan Williams 2022-11-29 340 map->resource = CXL_RESOURCE_NONE;
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 341 if (index == CXL_INSTANCES_COUNT)
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 342 return instance;
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 343
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 344 return -ENODEV;
> 303ebc1b1741b6 Ben Widawsky 2022-01-23 345 }
> 7167af677c5aa1 Huaisheng Ye 2025-01-14 346
>
next prev parent reply other threads:[~2025-01-15 13:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 13:10 [PATCH v4 0/1] cxl/core/regs: Refactor out functions to count regblocks of given type Huaisheng Ye
2025-01-14 13:10 ` [PATCH v4 1/1] " Huaisheng Ye
2025-01-14 15:03 ` kernel test robot
2025-01-15 13:34 ` Jonathan Cameron [this message]
2025-01-15 14:16 ` Ye, Huaisheng
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=20250115133437.00003240@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=huaisheng.ye@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=lkp@intel.com \
--cc=ming.li@zohomail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pei.p.jia@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox