Re: [PATCH v5 1/8] i3c: add target mode support

From: kernel test robot
Date: Fri Feb 02 2024 - 12:30:47 EST


Hi Frank,

kernel test robot noticed the following build errors:

[auto build test ERROR on tty/tty-testing]
[also build test ERROR on tty/tty-next tty/tty-linus robh/for-next linus/master v6.8-rc2 next-20240202]
[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/Frank-Li/i3c-add-target-mode-support/20240130-035826
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link: https://lore.kernel.org/r/20240129195321.229867-2-Frank.Li%40nxp.com
patch subject: [PATCH v5 1/8] i3c: add target mode support
config: x86_64-randconfig-104-20240202 (https://download.01.org/0day-ci/archive/20240203/202402030100.hmViPmOK-lkp@xxxxxxxxx/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/20240203/202402030100.hmViPmOK-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402030100.hmViPmOK-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

ld: drivers/i3c/target.o: in function `i3c_target_ctrl_destroy':
>> drivers/i3c/target.c:182: undefined reference to `i3c_target_cfs_remove_ctrl_group'
ld: drivers/i3c/target.o: in function `__i3c_target_func_register_driver':
>> drivers/i3c/target.c:406: undefined reference to `i3c_target_cfs_add_func_group'
ld: drivers/i3c/target.o: in function `__i3c_target_ctrl_create':
>> drivers/i3c/target.c:141: undefined reference to `i3c_target_cfs_add_ctrl_group'
ld: drivers/i3c/target.o: in function `i3c_target_ctrl_destroy':
>> drivers/i3c/target.c:182: undefined reference to `i3c_target_cfs_remove_ctrl_group'


vim +182 drivers/i3c/target.c

104
105 /**
106 * __i3c_target_ctrl_create() - create a new target controller device
107 * @dev: device that is creating the new target controller
108 * @ops: function pointers for performing target controller operations
109 * @owner: the owner of the module that creates the target controller device
110 *
111 * Return: Pointer to struct i3c_target_ctrl
112 */
113 struct i3c_target_ctrl *
114 __i3c_target_ctrl_create(struct device *dev, const struct i3c_target_ctrl_ops *ops,
115 struct module *owner)
116 {
117 struct i3c_target_ctrl *ctrl;
118 int ret;
119
120 if (WARN_ON(!dev))
121 return ERR_PTR(-EINVAL);
122
123 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
124 if (!ctrl)
125 return ERR_PTR(-ENOMEM);
126
127 device_initialize(&ctrl->dev);
128 ctrl->dev.class = i3c_target_ctrl_class;
129 ctrl->dev.parent = dev;
130 ctrl->dev.release = i3c_target_ctrl_release;
131 ctrl->ops = ops;
132
133 ret = dev_set_name(&ctrl->dev, "%s", dev_name(dev));
134 if (ret)
135 goto put_dev;
136
137 ret = device_add(&ctrl->dev);
138 if (ret)
139 goto put_dev;
140
> 141 ctrl->group = i3c_target_cfs_add_ctrl_group(ctrl);
142 if (!ctrl->group)
143 goto put_dev;
144
145 return ctrl;
146
147 put_dev:
148 put_device(&ctrl->dev);
149 kfree(ctrl);
150
151 return ERR_PTR(ret);
152 }
153 EXPORT_SYMBOL_GPL(__i3c_target_ctrl_create);
154
155 /**
156 * devm_i3c_target_ctrl_destroy() - destroy the target controller device
157 * @dev: device that hat has to be destroy
158 * @ctrl: the target controller device that has to be destroy
159 *
160 * Invoke to create a new target controller device and add it to i3c_target class. While at that, it
161 * also associates the device with the i3c_target using devres. On driver detach, release function
162 * is invoked on the devres data, then devres data is freed.
163 */
164 void devm_i3c_target_ctrl_destroy(struct device *dev, struct i3c_target_ctrl *ctrl)
165 {
166 int r;
167
168 r = devres_destroy(dev, devm_i3c_target_ctrl_release, devm_i3c_target_ctrl_match,
169 ctrl);
170 dev_WARN_ONCE(dev, r, "couldn't find I3C controller resource\n");
171 }
172 EXPORT_SYMBOL_GPL(devm_i3c_target_ctrl_destroy);
173
174 /**
175 * i3c_target_ctrl_destroy() - destroy the target controller device
176 * @ctrl: the target controller device that has to be destroyed
177 *
178 * Invoke to destroy the I3C target device
179 */
180 void i3c_target_ctrl_destroy(struct i3c_target_ctrl *ctrl)
181 {
> 182 i3c_target_cfs_remove_ctrl_group(ctrl->group);
183 device_unregister(&ctrl->dev);
184 }
185 EXPORT_SYMBOL_GPL(i3c_target_ctrl_destroy);
186

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