From: kernel test robot <lkp@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [djiang:pci-mbox 2/9] drivers/pci/mrb.c:55: warning: Function parameter or struct member 'dev_type' not described in 'mmio_find_regblock_instance'
Date: Fri, 10 May 2024 21:01:44 +0800 [thread overview]
Message-ID: <202405102051.D264as1O-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git pci-mbox
head: 9c38a15525283584d0d49404c11c397fe71ba1e8
commit: a08c6a2a48f9dea06ca214c1d3cd9c199098e25b [2/9] PCI: Add discovery of MMIO register block common helpers
config: x86_64-buildonly-randconfig-001-20240510 (https://download.01.org/0day-ci/archive/20240510/202405102051.D264as1O-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240510/202405102051.D264as1O-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/202405102051.D264as1O-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pci/mrb.c:55: warning: Function parameter or struct member 'dev_type' not described in 'mmio_find_regblock_instance'
>> drivers/pci/mrb.c:55: warning: Function parameter or struct member 'index' not described in 'mmio_find_regblock_instance'
>> drivers/pci/mrb.c:55: warning: expecting prototype for mmio_find_regblock(). Prototype was for mmio_find_regblock_instance() instead
--
>> drivers/cxl/core/regs.c:599: warning: expecting prototype for cxl_find_regblock_instance(). Prototype was for cxl_find_dvsec_regblock_instance() instead
vim +55 drivers/pci/mrb.c
40
41 /**
42 * mmio_find_regblock() - Locate MMIO register blocks by type
43 * @pdev: The PCI device to enumerate
44 * @type: Register Block ID
45 * @map: Enumeration output, clobbered on error
46 *
47 * Return: 0 if register block enumerated, negative error code otherwise
48 *
49 * One or more register blocks may exist, search for them by @type.
50 */
51 int mmio_find_regblock_instance(struct pci_dev *pdev,
52 enum mrb_dev_type dev_type, int type,
53 struct mmio_register_map *map,
54 int index)
> 55 {
56 u32 mrbl_size, mrbl_blocks;
57 int instance = 0;
58 int mloc, i;
59
60 *map = (struct mmio_register_map) {
61 .dev_type = dev_type,
62 .host = &pdev->dev,
63 .resource = MMIO_RESOURCE_NONE,
64 };
65
66 switch (dev_type) {
67 case DEV_TYPE_PCI:
68 mloc = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_MRBL);
69 pci_read_config_dword(pdev, mloc + PCI_MRBL_CAP, &mrbl_size);
70 mrbl_size = PCI_MRBL_LEN(mrbl_size);
71 mloc += PCI_MRBL_REG_LOCATOR_BLOCK1_OFFSET;
72 mrbl_blocks = (mrbl_size - PCI_MRBL_REG_LOCATOR_BLOCK1_OFFSET) / 8;
73 break;
74 case DEV_TYPE_CXL:
75 mloc = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
76 CXL_DVSEC_REG_LOCATOR);
77 pci_read_config_dword(pdev, mloc + PCI_DVSEC_HEADER1, &mrbl_size);
78 mrbl_size = PCI_DVSEC_HEADER1_LEN(mrbl_size);
79 mloc += CXL_DVSEC_REG_LOCATOR_BLOCK1_OFFSET;
80 mrbl_blocks = (mrbl_size - CXL_DVSEC_REG_LOCATOR_BLOCK1_OFFSET) / 8;
81 break;
82 default:
83 return -EINVAL;
84 }
85
86 if (!mloc)
87 return -ENXIO;
88
89 for (i = 0; i < mrbl_blocks; i++, mloc += 8) {
90 u32 reg_lo, reg_hi;
91
92 pci_read_config_dword(pdev, mloc, ®_lo);
93 pci_read_config_dword(pdev, mloc + 4, ®_hi);
94
95 if (!decode_regblock(pdev, reg_lo, reg_hi, map))
96 continue;
97
98 if (map->reg_type == type) {
99 if (index == instance)
100 return 0;
101 instance++;
102 }
103 }
104
105 map->resource = MMIO_RESOURCE_NONE;
106
107 return -ENODEV;
108 }
109 EXPORT_SYMBOL_GPL(mmio_find_regblock_instance);
110
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-10 13:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202405102051.D264as1O-lkp@intel.com \
--to=lkp@intel.com \
--cc=dave.jiang@intel.com \
--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).