From: kernel test robot <lkp@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, kbuild-all@lists.01.org
Subject: [staging:greybus 356/357] drivers/staging/greybus/vibrator.c:224: undefined reference to `input_ff_create_memless'
Date: Wed, 16 Jun 2021 05:01:20 +0800 [thread overview]
Message-ID: <202106160514.ZA3LxgQ7-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4204 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git greybus
head: cab4d7cd1ee96333007cb5d539286cd41ee99dde
commit: 43fd84431f464681bc88b0d62367dcf86f93cdf1 [356/357] staging: greybus: vibrator: use proper API for vibrator devices
config: x86_64-randconfig-s022-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=43fd84431f464681bc88b0d62367dcf86f93cdf1
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git fetch --no-tags staging greybus
git checkout 43fd84431f464681bc88b0d62367dcf86f93cdf1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: drivers/staging/greybus/vibrator.o: in function `gb_vibrator_probe':
>> drivers/staging/greybus/vibrator.c:224: undefined reference to `input_ff_create_memless'
vim +224 drivers/staging/greybus/vibrator.c
158
159 static int gb_vibrator_probe(struct gb_bundle *bundle,
160 const struct greybus_bundle_id *id)
161 {
162 struct greybus_descriptor_cport *cport_desc;
163 struct gb_connection *connection;
164 struct gb_vibrator_device *vib;
165 struct device *dev;
166 int retval;
167
168 if (bundle->num_cports != 1)
169 return -ENODEV;
170
171 cport_desc = &bundle->cport_desc[0];
172 if (cport_desc->protocol_id != GREYBUS_PROTOCOL_VIBRATOR)
173 return -ENODEV;
174
175 vib = kzalloc(sizeof(*vib), GFP_KERNEL);
176 if (!vib)
177 return -ENOMEM;
178
179 connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id),
180 NULL);
181 if (IS_ERR(connection)) {
182 retval = PTR_ERR(connection);
183 goto err_free_vib;
184 }
185 gb_connection_set_data(connection, vib);
186
187 vib->connection = connection;
188
189 greybus_set_drvdata(bundle, vib);
190
191 retval = gb_connection_enable(connection);
192 if (retval)
193 goto err_connection_destroy;
194
195 /*
196 * For now we create a device in sysfs for the vibrator, but odds are
197 * there is a "real" device somewhere in the kernel for this, but I
198 * can't find it at the moment...
199 */
200 vib->minor = ida_simple_get(&minors, 0, 0, GFP_KERNEL);
201 if (vib->minor < 0) {
202 retval = vib->minor;
203 goto err_connection_disable;
204 }
205 dev = device_create(&vibrator_class, &bundle->dev,
206 MKDEV(0, 0), vib, "vibrator%d", vib->minor);
207 if (IS_ERR(dev)) {
208 retval = -EINVAL;
209 goto err_ida_remove;
210 }
211 vib->dev = dev;
212
213 INIT_DELAYED_WORK(&vib->delayed_work, gb_vibrator_worker);
214
215 INIT_WORK(&vib->play_work, gb_vibrator_play_work);
216 vib->input->name = "greybus-vibrator";
217 vib->input->close = gb_vibrator_close;
218 vib->input->dev.parent = &bundle->dev;
219 vib->input->id.bustype = BUS_HOST;
220
221 input_set_drvdata(vib->input, vib);
222 input_set_capability(vib->input, EV_FF, FF_RUMBLE);
223
> 224 retval = input_ff_create_memless(vib->input, NULL,
225 gb_vibrator_play_effect);
226 if (retval)
227 goto err_device_remove;
228
229 gb_pm_runtime_put_autosuspend(bundle);
230
231 return 0;
232
233 err_device_remove:
234 device_unregister(vib->dev);
235 err_ida_remove:
236 ida_simple_remove(&minors, vib->minor);
237 err_connection_disable:
238 gb_connection_disable(connection);
239 err_connection_destroy:
240 gb_connection_destroy(connection);
241 err_free_vib:
242 kfree(vib);
243
244 return retval;
245 }
246
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36830 bytes --]
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
reply other threads:[~2021-06-15 21: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=202106160514.ZA3LxgQ7-lkp@intel.com \
--to=lkp@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
/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).