From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH] devres: better type safety with devm_*_action()
Date: Wed, 10 Mar 2021 22:08:14 +0800 [thread overview]
Message-ID: <202103102232.WBGoCJ5S-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 17805 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210309235917.2134565-1-linux@rasmusvillemoes.dk>
References: <20210309235917.2134565-1-linux@rasmusvillemoes.dk>
TO: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Hi Rasmus,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on linux/master linus/master v5.12-rc2 next-20210310]
[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]
url: https://github.com/0day-ci/linux/commits/Rasmus-Villemoes/devres-better-type-safety-with-devm_-_action/20210310-080019
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git a38fd8748464831584a19438cbb3082b5a2dab15
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
config: s390-randconfig-s032-20210310 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/663d41317b8fa291fc1c82100b3e2526627ab4d4
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rasmus-Villemoes/devres-better-type-safety-with-devm_-_action/20210310-080019
git checkout 663d41317b8fa291fc1c82100b3e2526627ab4d4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/input/touchscreen/stmfts.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/touchscreen/stmfts.c:708:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/stmfts.c:708:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/touchscreen/stmfts.c:708:15: sparse: sparse: static assertion failed: "__same_type(stmfts_power_off + 0, void (*)(void *)) || __same_type(stmfts_power_off + 0, void (*)(typeof(sdata)))"
--
drivers/nvdimm/core.c: note: in included file (through include/linux/blk_types.h, include/linux/bio.h, include/linux/libnvdimm.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/nvdimm/core.c:172:13: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/core.c:172:13: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/core.c:172:13: sparse: sparse: static assertion failed: "__same_type(nvdimm_map_put + 0, void (*)(void *)) || __same_type(nvdimm_map_put + 0, void (*)(typeof(nvdimm_map)))"
--
drivers/nvdimm/dimm_devs.c: note: in included file:
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/nvdimm/dimm_devs.c:663:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/dimm_devs.c:663:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/dimm_devs.c:663:16: sparse: sparse: static assertion failed: "__same_type(shutdown_security_notify + 0, void (*)(void *)) || __same_type(shutdown_security_notify + 0, void (*)(typeof(nvdimm)))"
--
drivers/nvdimm/namespace_devs.c: note: in included file:
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/nvdimm/namespace_devs.c:2594:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/namespace_devs.c:2594:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/namespace_devs.c:2594:16: sparse: sparse: static assertion failed: "__same_type(deactivate_labels + 0, void (*)(void *)) || __same_type(deactivate_labels + 0, void (*)(typeof(nd_region)))"
--
drivers/nvdimm/pmem.c: note: in included file (through include/linux/blk_types.h, include/linux/genhd.h, include/linux/blkdev.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/nvdimm/pmem.c:450:21: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/pmem.c:450:21: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/pmem.c:450:21: sparse: sparse: static assertion failed: "__same_type(pmem_release_queue + 0, void (*)(void *)) || __same_type(pmem_release_queue + 0, void (*)(typeof(&pmem->pgmap)))"
drivers/nvdimm/pmem.c:501:13: sparse: sparse: arithmetics on pointers to functions
drivers/nvdimm/pmem.c:501:13: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/pmem.c:501:13: sparse: sparse: static assertion failed: "__same_type(pmem_release_disk + 0, void (*)(void *)) || __same_type(pmem_release_disk + 0, void (*)(typeof(pmem)))"
--
drivers/nvdimm/blk.c: note: in included file (through include/linux/blk_types.h, include/linux/genhd.h, include/linux/blkdev.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/nvdimm/blk.c:256:13: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/blk.c:256:13: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/blk.c:256:13: sparse: sparse: static assertion failed: "__same_type(nd_blk_release_queue + 0, void (*)(void *)) || __same_type(nd_blk_release_queue + 0, void (*)(typeof(q)))"
drivers/nvdimm/blk.c:274:13: sparse: sparse: arithmetics on pointers to functions
drivers/nvdimm/blk.c:274:13: sparse: sparse: arithmetics on pointers to functions
>> drivers/nvdimm/blk.c:274:13: sparse: sparse: static assertion failed: "__same_type(nd_blk_release_disk + 0, void (*)(void *)) || __same_type(nd_blk_release_disk + 0, void (*)(typeof(disk)))"
--
drivers/cxl/mem.c: note: in included file (through include/linux/cdev.h):
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/cxl/mem.c:1216:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/cxl/mem.c:1216:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/cxl/mem.c:1216:16: sparse: sparse: static assertion failed: "__same_type(cxlmdev_unregister + 0, void (*)(void *)) || __same_type(cxlmdev_unregister + 0, void (*)(typeof(cxlmd)))"
vim +708 drivers/input/touchscreen/stmfts.c
78bcac7b2ae1e4 Andi Shyti 2017-06-05 624
78bcac7b2ae1e4 Andi Shyti 2017-06-05 625 static int stmfts_probe(struct i2c_client *client,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 626 const struct i2c_device_id *id)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 627 {
78bcac7b2ae1e4 Andi Shyti 2017-06-05 628 int err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 629 struct stmfts_data *sdata;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 630
78bcac7b2ae1e4 Andi Shyti 2017-06-05 631 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C |
78bcac7b2ae1e4 Andi Shyti 2017-06-05 632 I2C_FUNC_SMBUS_BYTE_DATA |
78bcac7b2ae1e4 Andi Shyti 2017-06-05 633 I2C_FUNC_SMBUS_I2C_BLOCK))
78bcac7b2ae1e4 Andi Shyti 2017-06-05 634 return -ENODEV;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 635
78bcac7b2ae1e4 Andi Shyti 2017-06-05 636 sdata = devm_kzalloc(&client->dev, sizeof(*sdata), GFP_KERNEL);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 637 if (!sdata)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 638 return -ENOMEM;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 639
78bcac7b2ae1e4 Andi Shyti 2017-06-05 640 i2c_set_clientdata(client, sdata);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 641
78bcac7b2ae1e4 Andi Shyti 2017-06-05 642 sdata->client = client;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 643 mutex_init(&sdata->mutex);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 644 init_completion(&sdata->cmd_done);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 645
78bcac7b2ae1e4 Andi Shyti 2017-06-05 646 sdata->regulators[STMFTS_REGULATOR_VDD].supply = "vdd";
78bcac7b2ae1e4 Andi Shyti 2017-06-05 647 sdata->regulators[STMFTS_REGULATOR_AVDD].supply = "avdd";
78bcac7b2ae1e4 Andi Shyti 2017-06-05 648 err = devm_regulator_bulk_get(&client->dev,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 649 ARRAY_SIZE(sdata->regulators),
78bcac7b2ae1e4 Andi Shyti 2017-06-05 650 sdata->regulators);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 651 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 652 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 653
78bcac7b2ae1e4 Andi Shyti 2017-06-05 654 sdata->input = devm_input_allocate_device(&client->dev);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 655 if (!sdata->input)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 656 return -ENOMEM;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 657
78bcac7b2ae1e4 Andi Shyti 2017-06-05 658 sdata->input->name = STMFTS_DEV_NAME;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 659 sdata->input->id.bustype = BUS_I2C;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 660 sdata->input->open = stmfts_input_open;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 661 sdata->input->close = stmfts_input_close;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 662
c9bfb2f0031a2d Chanwoo Choi 2017-10-18 663 input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_X);
c9bfb2f0031a2d Chanwoo Choi 2017-10-18 664 input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_Y);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 665 touchscreen_parse_properties(sdata->input, true, &sdata->prop);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 666
78bcac7b2ae1e4 Andi Shyti 2017-06-05 667 input_set_abs_params(sdata->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 668 input_set_abs_params(sdata->input, ABS_MT_TOUCH_MINOR, 0, 255, 0, 0);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 669 input_set_abs_params(sdata->input, ABS_MT_ORIENTATION, 0, 255, 0, 0);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 670 input_set_abs_params(sdata->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 671 input_set_abs_params(sdata->input, ABS_DISTANCE, 0, 255, 0, 0);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 672
78bcac7b2ae1e4 Andi Shyti 2017-06-05 673 sdata->use_key = device_property_read_bool(&client->dev,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 674 "touch-key-connected");
78bcac7b2ae1e4 Andi Shyti 2017-06-05 675 if (sdata->use_key) {
78bcac7b2ae1e4 Andi Shyti 2017-06-05 676 input_set_capability(sdata->input, EV_KEY, KEY_MENU);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 677 input_set_capability(sdata->input, EV_KEY, KEY_BACK);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 678 }
78bcac7b2ae1e4 Andi Shyti 2017-06-05 679
78bcac7b2ae1e4 Andi Shyti 2017-06-05 680 err = input_mt_init_slots(sdata->input,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 681 STMFTS_MAX_FINGERS, INPUT_MT_DIRECT);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 682 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 683 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 684
78bcac7b2ae1e4 Andi Shyti 2017-06-05 685 input_set_drvdata(sdata->input, sdata);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 686
cba04cdf437d74 Andi Shyti 2018-01-22 687 /*
cba04cdf437d74 Andi Shyti 2018-01-22 688 * stmfts_power_on expects interrupt to be disabled, but
cba04cdf437d74 Andi Shyti 2018-01-22 689 * at this point the device is still off and I do not trust
cba04cdf437d74 Andi Shyti 2018-01-22 690 * the status of the irq line that can generate some spurious
cba04cdf437d74 Andi Shyti 2018-01-22 691 * interrupts. To be on the safe side it's better to not enable
cba04cdf437d74 Andi Shyti 2018-01-22 692 * the interrupts during their request.
cba04cdf437d74 Andi Shyti 2018-01-22 693 */
cba04cdf437d74 Andi Shyti 2018-01-22 694 irq_set_status_flags(client->irq, IRQ_NOAUTOEN);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 695 err = devm_request_threaded_irq(&client->dev, client->irq,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 696 NULL, stmfts_irq_handler,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 697 IRQF_ONESHOT,
78bcac7b2ae1e4 Andi Shyti 2017-06-05 698 "stmfts_irq", sdata);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 699 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 700 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 701
78bcac7b2ae1e4 Andi Shyti 2017-06-05 702 dev_dbg(&client->dev, "initializing ST-Microelectronics FTS...\n");
78bcac7b2ae1e4 Andi Shyti 2017-06-05 703
78bcac7b2ae1e4 Andi Shyti 2017-06-05 704 err = stmfts_power_on(sdata);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 705 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 706 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 707
78bcac7b2ae1e4 Andi Shyti 2017-06-05 @708 err = devm_add_action_or_reset(&client->dev, stmfts_power_off, sdata);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 709 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 710 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 711
78bcac7b2ae1e4 Andi Shyti 2017-06-05 712 err = input_register_device(sdata->input);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 713 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 714 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 715
78bcac7b2ae1e4 Andi Shyti 2017-06-05 716 if (sdata->use_key) {
78bcac7b2ae1e4 Andi Shyti 2017-06-05 717 err = stmfts_enable_led(sdata);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 718 if (err) {
78bcac7b2ae1e4 Andi Shyti 2017-06-05 719 /*
78bcac7b2ae1e4 Andi Shyti 2017-06-05 720 * Even if the LEDs have failed to be initialized and
78bcac7b2ae1e4 Andi Shyti 2017-06-05 721 * used in the driver, I can still use the device even
78bcac7b2ae1e4 Andi Shyti 2017-06-05 722 * without LEDs. The ledvdd regulator pointer will be
78bcac7b2ae1e4 Andi Shyti 2017-06-05 723 * used as a flag.
78bcac7b2ae1e4 Andi Shyti 2017-06-05 724 */
78bcac7b2ae1e4 Andi Shyti 2017-06-05 725 dev_warn(&client->dev, "unable to use touchkey leds\n");
78bcac7b2ae1e4 Andi Shyti 2017-06-05 726 sdata->ledvdd = NULL;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 727 }
78bcac7b2ae1e4 Andi Shyti 2017-06-05 728 }
78bcac7b2ae1e4 Andi Shyti 2017-06-05 729
c2690bd69788c6 Andi Shyti 2017-09-22 730 err = devm_device_add_group(&client->dev, &stmfts_attribute_group);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 731 if (err)
78bcac7b2ae1e4 Andi Shyti 2017-06-05 732 return err;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 733
78bcac7b2ae1e4 Andi Shyti 2017-06-05 734 pm_runtime_enable(&client->dev);
1d960003603403 Marek Szyprowski 2018-03-30 735 device_enable_async_suspend(&client->dev);
78bcac7b2ae1e4 Andi Shyti 2017-06-05 736
78bcac7b2ae1e4 Andi Shyti 2017-06-05 737 return 0;
78bcac7b2ae1e4 Andi Shyti 2017-06-05 738 }
78bcac7b2ae1e4 Andi Shyti 2017-06-05 739
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23439 bytes --]
next reply other threads:[~2021-03-10 14:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 14:08 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-10 15:38 [RFC PATCH] devres: better type safety with devm_*_action() kernel test robot
2021-03-10 11:17 kernel test robot
2021-03-10 10:46 kernel test robot
2021-03-10 9:19 kernel test robot
2021-03-10 8:58 kernel test robot
2021-03-10 7:52 kernel test robot
2021-03-10 7:37 kernel test robot
2021-03-10 7:00 kernel test robot
2021-03-10 3:53 kernel test robot
2021-03-09 23:59 Rasmus Villemoes
2021-03-18 20:30 ` Rasmus Villemoes
2021-03-18 21:58 ` Kees Cook
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=202103102232.WBGoCJ5S-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.