From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] lis3lv02d: switch to using input device polling mode
Date: Wed, 02 Oct 2019 16:59:43 -0700 [thread overview]
Message-ID: <20191002235943.GC20549@dtor-ws> (raw)
In-Reply-To: <201910030738.k8Pojn6c%lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 5375 bytes --]
On Thu, Oct 03, 2019 at 07:30:23AM +0800, kbuild test robot wrote:
> Hi Dmitry,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on char-misc/char-misc-testing]
> [cannot apply to v5.4-rc1 next-20191002]
This is weird, I just tried applying it to both next-20191002 and Greg's
char-misc/char-misc-testing and it applied cleanly and compiled (on x86).
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/lis3lv02d-switch-to-using-input-device-polling-mode/20191003-062746
> config: parisc-allyesconfig (attached as .config)
> compiler: hppa-linux-gcc (GCC) 7.4.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=7.4.0 make.cross ARCH=parisc
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/misc/lis3lv02d/lis3lv02d.c: In function 'lis3lv02d_joystick_enable':
> drivers/misc/lis3lv02d/lis3lv02d.c:713:8: error: implicit declaration of function 'input_setup_polling'; did you mean 'input_set_capability'? [-Werror=implicit-function-declaration]
> err = input_setup_polling(input_dev, lis3lv02d_joystick_poll);
> ^~~~~~~~~~~~~~~~~~~
> input_set_capability
> >> drivers/misc/lis3lv02d/lis3lv02d.c:717:2: error: implicit declaration of function 'input_set_poll_interval'; did you mean '__put_user_internal'? [-Werror=implicit-function-declaration]
> input_set_poll_interval(input_dev, MDPS_POLL_INTERVAL);
> ^~~~~~~~~~~~~~~~~~~~~~~
> __put_user_internal
> drivers/misc/lis3lv02d/lis3lv02d.c:718:2: error: implicit declaration of function 'input_set_min_poll_interval' [-Werror=implicit-function-declaration]
> input_set_min_poll_interval(input_dev, MDPS_POLL_MIN);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/misc/lis3lv02d/lis3lv02d.c:719:2: error: implicit declaration of function 'input_set_max_poll_interval'; did you mean 'input_set_capability'? [-Werror=implicit-function-declaration]
> input_set_max_poll_interval(input_dev, MDPS_POLL_MAX);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> input_set_capability
> cc1: some warnings being treated as errors
>
> vim +717 drivers/misc/lis3lv02d/lis3lv02d.c
>
> 671
> 672 int lis3lv02d_joystick_enable(struct lis3lv02d *lis3)
> 673 {
> 674 struct input_dev *input_dev;
> 675 int err;
> 676 int max_val, fuzz, flat;
> 677 int btns[] = {BTN_X, BTN_Y, BTN_Z};
> 678
> 679 if (lis3->idev)
> 680 return -EINVAL;
> 681
> 682 input_dev = input_allocate_device();
> 683 if (!input_dev)
> 684 return -ENOMEM;
> 685
> 686 input_dev->name = "ST LIS3LV02DL Accelerometer";
> 687 input_dev->phys = DRIVER_NAME "/input0";
> 688 input_dev->id.bustype = BUS_HOST;
> 689 input_dev->id.vendor = 0;
> 690 input_dev->dev.parent = &lis3->pdev->dev;
> 691
> 692 input_dev->open = lis3lv02d_joystick_open;
> 693 input_dev->close = lis3lv02d_joystick_close;
> 694
> 695 max_val = (lis3->mdps_max_val * lis3->scale) / LIS3_ACCURACY;
> 696 if (lis3->whoami == WAI_12B) {
> 697 fuzz = LIS3_DEFAULT_FUZZ_12B;
> 698 flat = LIS3_DEFAULT_FLAT_12B;
> 699 } else {
> 700 fuzz = LIS3_DEFAULT_FUZZ_8B;
> 701 flat = LIS3_DEFAULT_FLAT_8B;
> 702 }
> 703 fuzz = (fuzz * lis3->scale) / LIS3_ACCURACY;
> 704 flat = (flat * lis3->scale) / LIS3_ACCURACY;
> 705
> 706 input_set_abs_params(input_dev, ABS_X, -max_val, max_val, fuzz, flat);
> 707 input_set_abs_params(input_dev, ABS_Y, -max_val, max_val, fuzz, flat);
> 708 input_set_abs_params(input_dev, ABS_Z, -max_val, max_val, fuzz, flat);
> 709
> 710 input_set_drvdata(input_dev, lis3);
> 711 lis3->idev = input_dev;
> 712
> > 713 err = input_setup_polling(input_dev, lis3lv02d_joystick_poll);
> 714 if (err)
> 715 goto err_free_input;
> 716
> > 717 input_set_poll_interval(input_dev, MDPS_POLL_INTERVAL);
> 718 input_set_min_poll_interval(input_dev, MDPS_POLL_MIN);
> 719 input_set_max_poll_interval(input_dev, MDPS_POLL_MAX);
> 720
> 721 lis3->mapped_btns[0] = lis3lv02d_get_axis(abs(lis3->ac.x), btns);
> 722 lis3->mapped_btns[1] = lis3lv02d_get_axis(abs(lis3->ac.y), btns);
> 723 lis3->mapped_btns[2] = lis3lv02d_get_axis(abs(lis3->ac.z), btns);
> 724
> 725 err = input_register_device(lis3->idev);
> 726 if (err)
> 727 goto err_free_input;
> 728
> 729 return 0;
> 730
> 731 err_free_input:
> 732 input_free_device(input_dev);
> 733 lis3->idev = NULL;
> 734 return err;
> 735
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
Thanks.
--
Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Eric Piel <eric.piel@tremplin-utc.net>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lis3lv02d: switch to using input device polling mode
Date: Wed, 2 Oct 2019 16:59:43 -0700 [thread overview]
Message-ID: <20191002235943.GC20549@dtor-ws> (raw)
In-Reply-To: <201910030738.k8Pojn6c%lkp@intel.com>
On Thu, Oct 03, 2019 at 07:30:23AM +0800, kbuild test robot wrote:
> Hi Dmitry,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on char-misc/char-misc-testing]
> [cannot apply to v5.4-rc1 next-20191002]
This is weird, I just tried applying it to both next-20191002 and Greg's
char-misc/char-misc-testing and it applied cleanly and compiled (on x86).
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/lis3lv02d-switch-to-using-input-device-polling-mode/20191003-062746
> config: parisc-allyesconfig (attached as .config)
> compiler: hppa-linux-gcc (GCC) 7.4.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=7.4.0 make.cross ARCH=parisc
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/misc/lis3lv02d/lis3lv02d.c: In function 'lis3lv02d_joystick_enable':
> drivers/misc/lis3lv02d/lis3lv02d.c:713:8: error: implicit declaration of function 'input_setup_polling'; did you mean 'input_set_capability'? [-Werror=implicit-function-declaration]
> err = input_setup_polling(input_dev, lis3lv02d_joystick_poll);
> ^~~~~~~~~~~~~~~~~~~
> input_set_capability
> >> drivers/misc/lis3lv02d/lis3lv02d.c:717:2: error: implicit declaration of function 'input_set_poll_interval'; did you mean '__put_user_internal'? [-Werror=implicit-function-declaration]
> input_set_poll_interval(input_dev, MDPS_POLL_INTERVAL);
> ^~~~~~~~~~~~~~~~~~~~~~~
> __put_user_internal
> drivers/misc/lis3lv02d/lis3lv02d.c:718:2: error: implicit declaration of function 'input_set_min_poll_interval' [-Werror=implicit-function-declaration]
> input_set_min_poll_interval(input_dev, MDPS_POLL_MIN);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/misc/lis3lv02d/lis3lv02d.c:719:2: error: implicit declaration of function 'input_set_max_poll_interval'; did you mean 'input_set_capability'? [-Werror=implicit-function-declaration]
> input_set_max_poll_interval(input_dev, MDPS_POLL_MAX);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> input_set_capability
> cc1: some warnings being treated as errors
>
> vim +717 drivers/misc/lis3lv02d/lis3lv02d.c
>
> 671
> 672 int lis3lv02d_joystick_enable(struct lis3lv02d *lis3)
> 673 {
> 674 struct input_dev *input_dev;
> 675 int err;
> 676 int max_val, fuzz, flat;
> 677 int btns[] = {BTN_X, BTN_Y, BTN_Z};
> 678
> 679 if (lis3->idev)
> 680 return -EINVAL;
> 681
> 682 input_dev = input_allocate_device();
> 683 if (!input_dev)
> 684 return -ENOMEM;
> 685
> 686 input_dev->name = "ST LIS3LV02DL Accelerometer";
> 687 input_dev->phys = DRIVER_NAME "/input0";
> 688 input_dev->id.bustype = BUS_HOST;
> 689 input_dev->id.vendor = 0;
> 690 input_dev->dev.parent = &lis3->pdev->dev;
> 691
> 692 input_dev->open = lis3lv02d_joystick_open;
> 693 input_dev->close = lis3lv02d_joystick_close;
> 694
> 695 max_val = (lis3->mdps_max_val * lis3->scale) / LIS3_ACCURACY;
> 696 if (lis3->whoami == WAI_12B) {
> 697 fuzz = LIS3_DEFAULT_FUZZ_12B;
> 698 flat = LIS3_DEFAULT_FLAT_12B;
> 699 } else {
> 700 fuzz = LIS3_DEFAULT_FUZZ_8B;
> 701 flat = LIS3_DEFAULT_FLAT_8B;
> 702 }
> 703 fuzz = (fuzz * lis3->scale) / LIS3_ACCURACY;
> 704 flat = (flat * lis3->scale) / LIS3_ACCURACY;
> 705
> 706 input_set_abs_params(input_dev, ABS_X, -max_val, max_val, fuzz, flat);
> 707 input_set_abs_params(input_dev, ABS_Y, -max_val, max_val, fuzz, flat);
> 708 input_set_abs_params(input_dev, ABS_Z, -max_val, max_val, fuzz, flat);
> 709
> 710 input_set_drvdata(input_dev, lis3);
> 711 lis3->idev = input_dev;
> 712
> > 713 err = input_setup_polling(input_dev, lis3lv02d_joystick_poll);
> 714 if (err)
> 715 goto err_free_input;
> 716
> > 717 input_set_poll_interval(input_dev, MDPS_POLL_INTERVAL);
> 718 input_set_min_poll_interval(input_dev, MDPS_POLL_MIN);
> 719 input_set_max_poll_interval(input_dev, MDPS_POLL_MAX);
> 720
> 721 lis3->mapped_btns[0] = lis3lv02d_get_axis(abs(lis3->ac.x), btns);
> 722 lis3->mapped_btns[1] = lis3lv02d_get_axis(abs(lis3->ac.y), btns);
> 723 lis3->mapped_btns[2] = lis3lv02d_get_axis(abs(lis3->ac.z), btns);
> 724
> 725 err = input_register_device(lis3->idev);
> 726 if (err)
> 727 goto err_free_input;
> 728
> 729 return 0;
> 730
> 731 err_free_input:
> 732 input_free_device(input_dev);
> 733 lis3->idev = NULL;
> 734 return err;
> 735
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
Thanks.
--
Dmitry
next prev parent reply other threads:[~2019-10-02 23:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 21:56 [PATCH] lis3lv02d: switch to using input device polling mode Dmitry Torokhov
2019-10-02 23:02 ` kbuild test robot
2019-10-02 23:02 ` kbuild test robot
2019-10-02 23:30 ` kbuild test robot
2019-10-02 23:30 ` kbuild test robot
2019-10-02 23:59 ` Dmitry Torokhov [this message]
2019-10-02 23:59 ` Dmitry Torokhov
2019-10-03 0:03 ` Dmitry Torokhov
2019-10-03 0:03 ` Dmitry Torokhov
2019-10-09 5:32 ` [kbuild-all] " Rong Chen
2019-10-09 5:34 ` Rong Chen
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=20191002235943.GC20549@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--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 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.