[staging:greybus 356/357] drivers/staging/greybus/vibrator.c:224: undefined reference to `input_ff_create_memless'

kernel test robot lkp at intel.com
Tue Jun 15 21:01:20 UTC 2021


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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 36830 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20210616/c83bd8d1/attachment-0001.bin>


More information about the devel mailing list