[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202412030337.aesRtC2T-lkp@intel.com>
Date: Tue, 3 Dec 2024 03:32:02 +0800
From: kernel test robot <lkp@...el.com>
To: alucerop@....com, linux-cxl@...r.kernel.org, netdev@...r.kernel.org,
dan.j.williams@...el.com, Jonathan.Cameron@...wei.com,
nifan.cxl@...il.com
Cc: oe-kbuild-all@...ts.linux.dev, Alejandro Lucero <alucerop@....com>
Subject: Re: [PATCHv3] cxl: avoid driver data for obtaining cxl_dev_state
reference
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on cxl/next]
[also build test ERROR on linus/master v6.13-rc1 next-20241128]
[cannot apply to cxl/pending horms-ipvs/master]
[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/alucerop-amd-com/cxl-avoid-driver-data-for-obtaining-cxl_dev_state-reference/20241202-210705
base: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git next
patch link: https://lore.kernel.org/r/20241202130009.49021-1-alucerop%40amd.com
patch subject: [PATCHv3] cxl: avoid driver data for obtaining cxl_dev_state reference
config: x86_64-buildonly-randconfig-005-20241203 (https://download.01.org/0day-ci/archive/20241203/202412030337.aesRtC2T-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/20241203/202412030337.aesRtC2T-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412030337.aesRtC2T-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from drivers/perf/../cxl/cxlpci.h:6,
from drivers/perf/cxl_pmu.c:23:
>> drivers/perf/../cxl/cxl.h:823:32: warning: 'struct cxl_dev_state' declared inside parameter list will not be visible outside of this definition or declaration
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~
--
In file included from drivers/cxl/cxlmem.h:12,
from drivers/cxl/mem.c:8:
>> drivers/cxl/cxl.h:823:32: warning: 'struct cxl_dev_state' declared inside parameter list will not be visible outside of this definition or declaration
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~
--
In file included from drivers/cxl/cxlmem.h:12,
from drivers/cxl/port.c:7:
>> drivers/cxl/cxl.h:823:32: warning: 'struct cxl_dev_state' declared inside parameter list will not be visible outside of this definition or declaration
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~
drivers/cxl/port.c: In function 'cxl_endpoint_port_probe':
>> drivers/cxl/port.c:101:34: error: passing argument 1 of 'cxl_dvsec_rr_decode' from incompatible pointer type [-Werror=incompatible-pointer-types]
101 | rc = cxl_dvsec_rr_decode(cxlds, &info);
| ^~~~~
| |
| struct cxl_dev_state *
drivers/cxl/cxl.h:823:47: note: expected 'struct cxl_dev_state *' but argument is of type 'struct cxl_dev_state *'
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/cxl/cxlpci.h:6,
from drivers/cxl/core/pci.c:10:
>> drivers/cxl/cxl.h:823:32: warning: 'struct cxl_dev_state' declared inside parameter list will not be visible outside of this definition or declaration
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~
>> drivers/cxl/core/pci.c:294:5: error: conflicting types for 'cxl_dvsec_rr_decode'; have 'int(struct cxl_dev_state *, struct cxl_endpoint_dvsec_info *)'
294 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~~~~~~~
drivers/cxl/cxl.h:823:5: note: previous declaration of 'cxl_dvsec_rr_decode' with type 'int(struct cxl_dev_state *, struct cxl_endpoint_dvsec_info *)'
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/printk.h:8,
from include/asm-generic/bug.h:22,
from arch/x86/include/asm/bug.h:99,
from include/linux/bug.h:5,
from include/linux/io.h:12,
from include/linux/io-64-nonatomic-lo-hi.h:5,
from drivers/cxl/core/pci.c:4:
drivers/cxl/core/pci.c:389:22: error: conflicting types for 'cxl_dvsec_rr_decode'; have 'int(struct cxl_dev_state *, struct cxl_endpoint_dvsec_info *)'
389 | EXPORT_SYMBOL_NS_GPL(cxl_dvsec_rr_decode, CXL);
| ^~~~~~~~~~~~~~~~~~~
include/linux/export.h:56:28: note: in definition of macro '__EXPORT_SYMBOL'
56 | extern typeof(sym) sym; \
| ^~~
drivers/cxl/core/pci.c:389:1: note: in expansion of macro 'EXPORT_SYMBOL_NS_GPL'
389 | EXPORT_SYMBOL_NS_GPL(cxl_dvsec_rr_decode, CXL);
| ^~~~~~~~~~~~~~~~~~~~
drivers/cxl/cxl.h:823:5: note: previous declaration of 'cxl_dvsec_rr_decode' with type 'int(struct cxl_dev_state *, struct cxl_endpoint_dvsec_info *)'
823 | int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
| ^~~~~~~~~~~~~~~~~~~
vim +/cxl_dvsec_rr_decode +101 drivers/cxl/port.c
91
92 static int cxl_endpoint_port_probe(struct cxl_port *port)
93 {
94 struct cxl_endpoint_dvsec_info info = { .port = port };
95 struct cxl_memdev *cxlmd = to_cxl_memdev(port->uport_dev);
96 struct cxl_dev_state *cxlds = cxlmd->cxlds;
97 struct cxl_hdm *cxlhdm;
98 struct cxl_port *root;
99 int rc;
100
> 101 rc = cxl_dvsec_rr_decode(cxlds, &info);
102 if (rc < 0)
103 return rc;
104
105 cxlhdm = devm_cxl_setup_hdm(port, &info);
106 if (IS_ERR(cxlhdm)) {
107 if (PTR_ERR(cxlhdm) == -ENODEV)
108 dev_err(&port->dev, "HDM decoder registers not found\n");
109 return PTR_ERR(cxlhdm);
110 }
111
112 /* Cache the data early to ensure is_visible() works */
113 read_cdat_data(port);
114 cxl_endpoint_parse_cdat(port);
115
116 get_device(&cxlmd->dev);
117 rc = devm_add_action_or_reset(&port->dev, schedule_detach, cxlmd);
118 if (rc)
119 return rc;
120
121 rc = cxl_hdm_decode_init(cxlds, cxlhdm, &info);
122 if (rc)
123 return rc;
124
125 rc = devm_cxl_enumerate_decoders(cxlhdm, &info);
126 if (rc)
127 return rc;
128
129 /*
130 * This can't fail in practice as CXL root exit unregisters all
131 * descendant ports and that in turn synchronizes with cxl_port_probe()
132 */
133 struct cxl_root *cxl_root __free(put_cxl_root) = find_cxl_root(port);
134
135 root = &cxl_root->port;
136
137 /*
138 * Now that all endpoint decoders are successfully enumerated, try to
139 * assemble regions from committed decoders
140 */
141 device_for_each_child(&port->dev, root, discover_region);
142
143 return 0;
144 }
145
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists