All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [asahilinux:touchpad/wip 79/82] drivers/hid/spi-hid/spi-hid-apple.c:177:22: warning: no previous prototype for 'spihid_get_data'
Date: Wed, 15 Dec 2021 22:55:05 +0800	[thread overview]
Message-ID: <202112152218.CbejumOS-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7683 bytes --]

tree:   https://github.com/AsahiLinux/linux touchpad/wip
head:   a2281d64fdbcbab0dae68c6ea75bd5b548332e06
commit: 49c089b290128ddba454c0341a9906337e24751e [79/82] WIP: hid: transport: spi: add apple SPI transport
config: nds32-allyesconfig (https://download.01.org/0day-ci/archive/20211215/202112152218.CbejumOS-lkp(a)intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/AsahiLinux/linux/commit/49c089b290128ddba454c0341a9906337e24751e
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux touchpad/wip
        git checkout 49c089b290128ddba454c0341a9906337e24751e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/hid/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/hid/spi-hid/spi-hid-apple.c:177:22: warning: no previous prototype for 'spihid_get_data' [-Wmissing-prototypes]
     177 | struct spihid_apple *spihid_get_data(struct spihid_input_dev *idev)
         |                      ^~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:189:5: warning: no previous prototype for 'apple_ll_start' [-Wmissing-prototypes]
     189 | int apple_ll_start(struct hid_device *hdev)
         |     ^~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:195:6: warning: no previous prototype for 'apple_ll_stop' [-Wmissing-prototypes]
     195 | void apple_ll_stop(struct hid_device *hdev)
         |      ^~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:202:5: warning: no previous prototype for 'apple_ll_open' [-Wmissing-prototypes]
     202 | int apple_ll_open(struct hid_device *hdev)
         |     ^~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:218:6: warning: no previous prototype for 'apple_ll_close' [-Wmissing-prototypes]
     218 | void apple_ll_close(struct hid_device *hdev)
         |      ^~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:225:5: warning: no previous prototype for 'apple_ll_parse' [-Wmissing-prototypes]
     225 | int apple_ll_parse(struct hid_device *hdev)
         |     ^~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:233:5: warning: no previous prototype for 'apple_ll_raw_request' [-Wmissing-prototypes]
     233 | int apple_ll_raw_request(struct hid_device *hdev, unsigned char reportnum,
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:257:5: warning: no previous prototype for 'apple_ll_output_report' [-Wmissing-prototypes]
     257 | int apple_ll_output_report(struct hid_device *hdev, __u8 *buf, size_t len)
         |     ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/spi-hid/spi-hid-apple.c: In function 'spi_hid_apple_probe':
   drivers/hid/spi-hid/spi-hid-apple.c:735:15: error: implicit declaration of function 'devm_request_threaded_irq'; did you mean 'devm_request_region'? [-Werror=implicit-function-declaration]
     735 |         err = devm_request_threaded_irq(dev, spihid->irq, NULL,
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
         |               devm_request_region
   drivers/hid/spi-hid/spi-hid-apple.c:736:60: error: 'IRQF_ONESHOT' undeclared (first use in this function); did you mean 'SA_ONESHOT'?
     736 |                                         spi_hid_apple_irq, IRQF_ONESHOT,
         |                                                            ^~~~~~~~~~~~
         |                                                            SA_ONESHOT
   drivers/hid/spi-hid/spi-hid-apple.c:736:60: note: each undeclared identifier is reported only once for each function it appears in
   drivers/hid/spi-hid/spi-hid-apple.c: In function 'spi_hid_apple_remove':
   drivers/hid/spi-hid/spi-hid-apple.c:794:9: error: implicit declaration of function 'disable_irq'; did you mean 'disable_fpu'? [-Werror=implicit-function-declaration]
     794 |         disable_irq(spihid->irq);
         |         ^~~~~~~~~~~
         |         disable_fpu
   cc1: some warnings being treated as errors


vim +/spihid_get_data +177 drivers/hid/spi-hid/spi-hid-apple.c

   176	
 > 177	struct spihid_apple *spihid_get_data(struct spihid_input_dev *idev)
   178	{
   179		switch (idev->id) {
   180		case SPI_HID_DEVICE_ID_KBD:
   181			return container_of(idev, struct spihid_apple, kbd);
   182		case SPI_HID_DEVICE_ID_TP:
   183			return container_of(idev, struct spihid_apple, tp);
   184		default:
   185			return NULL;
   186		}
   187	}
   188	
 > 189	int apple_ll_start(struct hid_device *hdev)
   190	{
   191		/* no-op SPI transport is already setup */
   192		return 0;
   193	};
   194	
 > 195	void apple_ll_stop(struct hid_device *hdev)
   196	{
   197		/* no-op, devices will be desstroyed on driver destruction */
   198		struct spihid_input_dev *idev = hdev->driver_data;
   199		printk(KERN_DEBUG "spihid_apple %s - dev:%hhu", __func__, idev->id);
   200	}
   201	
 > 202	int apple_ll_open(struct hid_device *hdev)
   203	{
   204		struct spihid_apple *spihid;
   205		struct spihid_input_dev *idev = hdev->driver_data;
   206		printk(KERN_DEBUG "spihid_apple %s - dev:%hhu", __func__, idev->id);
   207	
   208		if (idev->hid_desc_len == 0) {
   209			spihid = spihid_get_data(idev);
   210			dev_warn(&spihid->spidev->dev,
   211				 "HID descriptor missing for dev %u", idev->id);
   212		} else
   213			idev->ready = true;
   214	
   215		return 0;
   216	}
   217	
 > 218	void apple_ll_close(struct hid_device *hdev)
   219	{
   220		struct spihid_input_dev *idev = hdev->driver_data;
   221		printk(KERN_DEBUG "spihid_apple %s - dev:%hhu", __func__, idev->id);
   222		idev->ready = false;
   223	}
   224	
 > 225	int apple_ll_parse(struct hid_device *hdev)
   226	{
   227		struct spihid_input_dev *idev = hdev->driver_data;
   228		printk(KERN_DEBUG "spihid_apple %s idev->id:%hhu", __func__, idev->id);
   229	
   230		return hid_parse_report(hdev, idev->hid_desc, idev->hid_desc_len);
   231	}
   232	
 > 233	int apple_ll_raw_request(struct hid_device *hdev, unsigned char reportnum,
   234				 __u8 *buf, size_t len, unsigned char rtype,
   235				 int reqtype)
   236	{
   237		struct spihid_input_dev *idev = hdev->driver_data;
   238		struct spihid_apple *spihid = spihid_get_data(idev);
   239	
   240		dev_dbg(&spihid->spidev->dev, "%s reqtype:%d size:%zu", __func__,
   241			reqtype, len);
   242	
   243		switch (reqtype) {
   244		case HID_REQ_GET_REPORT:
   245			return 0;
   246			// return i2c_hid_get_raw_report(hid, reportnum, buf, len, rtype);
   247		case HID_REQ_SET_REPORT:
   248			if (buf[0] != reportnum)
   249				return -EINVAL;
   250			return 0;
   251			// return i2c_hid_output_raw_report(hid, buf, len, rtype, true);
   252		default:
   253			return -EIO;
   254		}
   255	}
   256	
 > 257	int apple_ll_output_report(struct hid_device *hdev, __u8 *buf, size_t len)
   258	{
   259		struct spihid_input_dev *idev = hdev->driver_data;
   260		struct spihid_apple *spihid = spihid_get_data(idev);
   261		if (!spihid)
   262			return -1;
   263	
   264		dev_dbg(&spihid->spidev->dev, "%s", __func__);
   265	
   266		return 0;
   267	}
   268	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Janne Grunau <j@jannau.net>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Hector Martin <marcan@marcan.st>
Subject: [asahilinux:touchpad/wip 79/82] drivers/hid/spi-hid/spi-hid-apple.c:177:22: warning: no previous prototype for 'spihid_get_data'
Date: Wed, 15 Dec 2021 22:55:05 +0800	[thread overview]
Message-ID: <202112152218.CbejumOS-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux touchpad/wip
head:   a2281d64fdbcbab0dae68c6ea75bd5b548332e06
commit: 49c089b290128ddba454c0341a9906337e24751e [79/82] WIP: hid: transport: spi: add apple SPI transport
config: nds32-allyesconfig (https://download.01.org/0day-ci/archive/20211215/202112152218.CbejumOS-lkp@intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/AsahiLinux/linux/commit/49c089b290128ddba454c0341a9906337e24751e
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux touchpad/wip
        git checkout 49c089b290128ddba454c0341a9906337e24751e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/hid/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/hid/spi-hid/spi-hid-apple.c:177:22: warning: no previous prototype for 'spihid_get_data' [-Wmissing-prototypes]
     177 | struct spihid_apple *spihid_get_data(struct spihid_input_dev *idev)
         |                      ^~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:189:5: warning: no previous prototype for 'apple_ll_start' [-Wmissing-prototypes]
     189 | int apple_ll_start(struct hid_device *hdev)
         |     ^~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:195:6: warning: no previous prototype for 'apple_ll_stop' [-Wmissing-prototypes]
     195 | void apple_ll_stop(struct hid_device *hdev)
         |      ^~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:202:5: warning: no previous prototype for 'apple_ll_open' [-Wmissing-prototypes]
     202 | int apple_ll_open(struct hid_device *hdev)
         |     ^~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:218:6: warning: no previous prototype for 'apple_ll_close' [-Wmissing-prototypes]
     218 | void apple_ll_close(struct hid_device *hdev)
         |      ^~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:225:5: warning: no previous prototype for 'apple_ll_parse' [-Wmissing-prototypes]
     225 | int apple_ll_parse(struct hid_device *hdev)
         |     ^~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:233:5: warning: no previous prototype for 'apple_ll_raw_request' [-Wmissing-prototypes]
     233 | int apple_ll_raw_request(struct hid_device *hdev, unsigned char reportnum,
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple.c:257:5: warning: no previous prototype for 'apple_ll_output_report' [-Wmissing-prototypes]
     257 | int apple_ll_output_report(struct hid_device *hdev, __u8 *buf, size_t len)
         |     ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/spi-hid/spi-hid-apple.c: In function 'spi_hid_apple_probe':
   drivers/hid/spi-hid/spi-hid-apple.c:735:15: error: implicit declaration of function 'devm_request_threaded_irq'; did you mean 'devm_request_region'? [-Werror=implicit-function-declaration]
     735 |         err = devm_request_threaded_irq(dev, spihid->irq, NULL,
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
         |               devm_request_region
   drivers/hid/spi-hid/spi-hid-apple.c:736:60: error: 'IRQF_ONESHOT' undeclared (first use in this function); did you mean 'SA_ONESHOT'?
     736 |                                         spi_hid_apple_irq, IRQF_ONESHOT,
         |                                                            ^~~~~~~~~~~~
         |                                                            SA_ONESHOT
   drivers/hid/spi-hid/spi-hid-apple.c:736:60: note: each undeclared identifier is reported only once for each function it appears in
   drivers/hid/spi-hid/spi-hid-apple.c: In function 'spi_hid_apple_remove':
   drivers/hid/spi-hid/spi-hid-apple.c:794:9: error: implicit declaration of function 'disable_irq'; did you mean 'disable_fpu'? [-Werror=implicit-function-declaration]
     794 |         disable_irq(spihid->irq);
         |         ^~~~~~~~~~~
         |         disable_fpu
   cc1: some warnings being treated as errors


vim +/spihid_get_data +177 drivers/hid/spi-hid/spi-hid-apple.c

   176	
 > 177	struct spihid_apple *spihid_get_data(struct spihid_input_dev *idev)
   178	{
   179		switch (idev->id) {
   180		case SPI_HID_DEVICE_ID_KBD:
   181			return container_of(idev, struct spihid_apple, kbd);
   182		case SPI_HID_DEVICE_ID_TP:
   183			return container_of(idev, struct spihid_apple, tp);
   184		default:
   185			return NULL;
   186		}
   187	}
   188	
 > 189	int apple_ll_start(struct hid_device *hdev)
   190	{
   191		/* no-op SPI transport is already setup */
   192		return 0;
   193	};
   194	
 > 195	void apple_ll_stop(struct hid_device *hdev)
   196	{
   197		/* no-op, devices will be desstroyed on driver destruction */
   198		struct spihid_input_dev *idev = hdev->driver_data;
   199		printk(KERN_DEBUG "spihid_apple %s - dev:%hhu", __func__, idev->id);
   200	}
   201	
 > 202	int apple_ll_open(struct hid_device *hdev)
   203	{
   204		struct spihid_apple *spihid;
   205		struct spihid_input_dev *idev = hdev->driver_data;
   206		printk(KERN_DEBUG "spihid_apple %s - dev:%hhu", __func__, idev->id);
   207	
   208		if (idev->hid_desc_len == 0) {
   209			spihid = spihid_get_data(idev);
   210			dev_warn(&spihid->spidev->dev,
   211				 "HID descriptor missing for dev %u", idev->id);
   212		} else
   213			idev->ready = true;
   214	
   215		return 0;
   216	}
   217	
 > 218	void apple_ll_close(struct hid_device *hdev)
   219	{
   220		struct spihid_input_dev *idev = hdev->driver_data;
   221		printk(KERN_DEBUG "spihid_apple %s - dev:%hhu", __func__, idev->id);
   222		idev->ready = false;
   223	}
   224	
 > 225	int apple_ll_parse(struct hid_device *hdev)
   226	{
   227		struct spihid_input_dev *idev = hdev->driver_data;
   228		printk(KERN_DEBUG "spihid_apple %s idev->id:%hhu", __func__, idev->id);
   229	
   230		return hid_parse_report(hdev, idev->hid_desc, idev->hid_desc_len);
   231	}
   232	
 > 233	int apple_ll_raw_request(struct hid_device *hdev, unsigned char reportnum,
   234				 __u8 *buf, size_t len, unsigned char rtype,
   235				 int reqtype)
   236	{
   237		struct spihid_input_dev *idev = hdev->driver_data;
   238		struct spihid_apple *spihid = spihid_get_data(idev);
   239	
   240		dev_dbg(&spihid->spidev->dev, "%s reqtype:%d size:%zu", __func__,
   241			reqtype, len);
   242	
   243		switch (reqtype) {
   244		case HID_REQ_GET_REPORT:
   245			return 0;
   246			// return i2c_hid_get_raw_report(hid, reportnum, buf, len, rtype);
   247		case HID_REQ_SET_REPORT:
   248			if (buf[0] != reportnum)
   249				return -EINVAL;
   250			return 0;
   251			// return i2c_hid_output_raw_report(hid, buf, len, rtype, true);
   252		default:
   253			return -EIO;
   254		}
   255	}
   256	
 > 257	int apple_ll_output_report(struct hid_device *hdev, __u8 *buf, size_t len)
   258	{
   259		struct spihid_input_dev *idev = hdev->driver_data;
   260		struct spihid_apple *spihid = spihid_get_data(idev);
   261		if (!spihid)
   262			return -1;
   263	
   264		dev_dbg(&spihid->spidev->dev, "%s", __func__);
   265	
   266		return 0;
   267	}
   268	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

             reply	other threads:[~2021-12-15 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 14:55 kernel test robot [this message]
2021-12-15 14:55 ` [asahilinux:touchpad/wip 79/82] drivers/hid/spi-hid/spi-hid-apple.c:177:22: warning: no previous prototype for 'spihid_get_data' kernel test robot

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=202112152218.CbejumOS-lkp@intel.com \
    --to=lkp@intel.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.