Re: [PATCH v6 7/7] i3c: hub: p3h2x4x: Add support for NXP P3H2x4x I3C hub functionality

kernel test robot
2026-03-10T22:10:45Z

Hi Lakshay,

kernel test robot noticed the following build errors:

[auto build test ERROR on i3c/i3c/next]
[also build test ERROR on lee-mfd/for-mfd-next broonie-regulator/for-next linus/master v7.0-rc3 next-20260310]
[cannot apply to lee-mfd/for-mfd-fixes]
[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/Lakshay-Piplani/i3c-master-Add-the-APIs-to-support-I3C-hub/20260310-150040
base: https://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git i3c/next
patch link: https://lore.kernel.org/r/20260310065727.3759342-7-lakshay.piplani%40nxp.com
patch subject: [PATCH v6 7/7] i3c: hub: p3h2x4x: Add support for NXP P3H2x4x I3C hub functionality
config: riscv-randconfig-001-20260311 (https://download.01.org/0day-ci/archive/20260311/202603110643.VWCcqjaP-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260311/202603110643.VWCcqjaP-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/202603110643.VWCcqjaP-lkp@intel.com/

All errors (new ones prefixed by >>):

drivers/i3c/hub/p3h2840_i3c_hub_smbus.c: In function 'p3h2x4x_tp_i2c_xfer_msg':
>> drivers/i3c/hub/p3h2840_i3c_hub_smbus.c:263:2: error: a label can only be part of a statement and a declaration is not a statement
int ret2;
^~~

vim +263 drivers/i3c/hub/p3h2840_i3c_hub_smbus.c

176
177 /**
178 * p3h2x4x_tp_i2c_xfer_msg() - This starts a SMBus write transaction by writing a descriptor
179 * and a message to the p3h2x4x registers. Controller buffer page is determined by multiplying the
180 * target port index by four and adding the base page number to it.
181 */
182 static int p3h2x4x_tp_i2c_xfer_msg(struct p3h2x4x_i3c_hub_dev *p3h2x4x_i3c_hub,
183 struct i2c_msg *xfers,
184 u8 target_port,
185 u8 nxfers_i, u8 rw)
186 {
187 u8 controller_buffer_page = P3H2x4x_CONTROLLER_BUFFER_PAGE + 4 * target_port;
188 u8 target_port_status = P3H2x4x_TP0_SMBUS_AGNT_STS + target_port;
189 u8 desc[P3H2x4x_SMBUS_DESCRIPTOR_SIZE] = { 0 };
190 u8 transaction_type = P3H2x4x_SMBUS_400kHz;
191 int write_length, read_length;
192 u8 addr = xfers[nxfers_i].addr;
193 u8 rw_address = 2 * addr;
194 int ret;
195
196 if (rw == 2) { /* write and read */
197 write_length = xfers[nxfers_i].len;
198 read_length = xfers[nxfers_i + 1].len;
199 } else if (rw == 1) {
200 rw_address |= P3H2x4x_SET_BIT(0);
201 write_length = 0;
202 read_length = xfers[nxfers_i].len;
203 } else {
204 write_length = xfers[nxfers_i].len;
205 read_length = 0;
206 }
207
208 desc[0] = rw_address;
209 if (rw == 2)
210 desc[1] = transaction_type | P3H2x4x_SET_BIT(0);
211 else
212 desc[1] = transaction_type;
213 desc[2] = write_length;
214 desc[3] = read_length;
215
216 ret = regmap_write(p3h2x4x_i3c_hub->regmap, target_port_status,
217 P3H2x4x_TP_BUFFER_STATUS_MASK);
218 if (ret)
219 goto out;
220
221 ret = regmap_write(p3h2x4x_i3c_hub->regmap, P3H2x4x_PAGE_PTR, controller_buffer_page);
222
223 if (ret)
224 goto out;
225
226 ret = regmap_bulk_write(p3h2x4x_i3c_hub->regmap, P3H2x4x_CONTROLLER_AGENT_BUFF,
227 desc, P3H2x4x_SMBUS_DESCRIPTOR_SIZE);
228
229 if (ret)
230 goto out;
231
232 if (!(rw % 2)) {
233 ret = regmap_bulk_write(p3h2x4x_i3c_hub->regmap,
234 P3H2x4x_CONTROLLER_AGENT_BUFF_DATA,
235 xfers[nxfers_i].buf, xfers[nxfers_i].len);
236 if (ret)
237 goto out;
238 }
239
240 ret = regmap_write(p3h2x4x_i3c_hub->regmap, P3H2x4x_TP_SMBUS_AGNT_TRANS_START,
241 p3h2x4x_i3c_hub->tp_bus[target_port].tp_mask);
242
243 if (ret)
244 goto out;
245
246 ret = p3h2x4x_read_smbus_transaction_status(p3h2x4x_i3c_hub,
247 target_port_status,
248 (write_length + read_length));
249 if (ret)
250 goto out;
251
252 if (rw) {
253 if (rw == 2)
254 nxfers_i += 1;
255
256 ret = regmap_bulk_read(p3h2x4x_i3c_hub->regmap,
257 P3H2x4x_CONTROLLER_AGENT_BUFF_DATA + write_length,
258 xfers[nxfers_i].buf, xfers[nxfers_i].len);
259 if (ret)
260 goto out;
261 }
262 out:
> 263 int ret2;
264
265 ret2 = regmap_write(p3h2x4x_i3c_hub->regmap,
266 P3H2x4x_PAGE_PTR, 0x00);
267 if (!ret && ret2)
268 ret = ret2;
269
270 return ret;
271 }
272

--
0-DAY CI Kernel Test Service