mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>,
	Jiri Kosina <jikos@kernel.org>
Cc: kbuild-all@lists.01.org,
	"Emmanuel Gil Peyrot" <linkmauve@linkmauve.fr>,
	linux-input@vger.kernel.org, "Ash Logan" <ash@heyquark.com>,
	"Jonathan Neuschäfer" <j.ne@posteo.net>,
	"Barnabás Pőcze" <pobrn@protonmail.com>,
	"Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
	linux-kernel@vger.kernel.org,
	"Daniel J . Ogorchock" <djogorchock@gmail.com>
Subject: Re: [PATCH v4 1/5] HID: nintendo: split switch support into its own file
Date: Fri, 22 Oct 2021 18:25:31 +0800	[thread overview]
Message-ID: <202110221813.xxu1rf2C-lkp@intel.com> (raw)
In-Reply-To: <20211019110418.26874-2-linkmauve@linkmauve.fr>

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

Hi Emmanuel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hid/for-next]
[cannot apply to jikos-trivial/for-next v5.15-rc6 next-20211021]
[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/Emmanuel-Gil-Peyrot/HID-nintendo-split-switch-support-into-its-own-file/20211019-200531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/ef6cb9d1fa01a825280bca49c84b644b8d08bfa6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Emmanuel-Gil-Peyrot/HID-nintendo-split-switch-support-into-its-own-file/20211019-200531
        git checkout ef6cb9d1fa01a825280bca49c84b644b8d08bfa6
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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 >>):

   drivers/hid/hid-nintendo-switch.c:406:2: error: 'LED_FUNCTION_PLAYER1' undeclared here (not in a function); did you mean 'LED_FUNCTION_ALARM'?
     406 |  LED_FUNCTION_PLAYER1,
         |  ^~~~~~~~~~~~~~~~~~~~
         |  LED_FUNCTION_ALARM
   drivers/hid/hid-nintendo-switch.c:407:2: error: 'LED_FUNCTION_PLAYER2' undeclared here (not in a function); did you mean 'LED_FUNCTION_ALARM'?
     407 |  LED_FUNCTION_PLAYER2,
         |  ^~~~~~~~~~~~~~~~~~~~
         |  LED_FUNCTION_ALARM
   drivers/hid/hid-nintendo-switch.c:408:2: error: 'LED_FUNCTION_PLAYER3' undeclared here (not in a function); did you mean 'LED_FUNCTION_ALARM'?
     408 |  LED_FUNCTION_PLAYER3,
         |  ^~~~~~~~~~~~~~~~~~~~
         |  LED_FUNCTION_ALARM
   drivers/hid/hid-nintendo-switch.c:409:2: error: 'LED_FUNCTION_PLAYER4' undeclared here (not in a function); did you mean 'LED_FUNCTION_ALARM'?
     409 |  LED_FUNCTION_PLAYER4,
         |  ^~~~~~~~~~~~~~~~~~~~
         |  LED_FUNCTION_ALARM
   drivers/hid/hid-nintendo-switch.c: In function 'joycon_leds_create':
   drivers/hid/hid-nintendo-switch.c:1881:11: error: 'LED_FUNCTION_PLAYER5' undeclared (first use in this function); did you mean 'LED_FUNCTION_ALARM'?
    1881 |           LED_FUNCTION_PLAYER5);
         |           ^~~~~~~~~~~~~~~~~~~~
         |           LED_FUNCTION_ALARM
   drivers/hid/hid-nintendo-switch.c:1881:11: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/hid/hid-nintendo-switch.c:1878:50: error: format '%s' expects argument of type 'char *', but argument 6 has type 'const char * const*' [-Werror=format=]
    1878 |   name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s:%s",
         |                                                 ~^
         |                                                  |
         |                                                  char *
   ......
    1881 |           LED_FUNCTION_PLAYER5);
         |           ~~~~~~~~~~~~~~~~~~~~                    
         |           |
         |           const char * const*
   At top level:
   drivers/hid/hid-nintendo-switch.c:99:17: error: 'JC_USB_SEND_UART' defined but not used [-Werror=unused-const-variable=]
      99 | static const u8 JC_USB_SEND_UART  = 0x92;
         |                 ^~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:98:17: error: 'JC_USB_PRE_HANDSHAKE' defined but not used [-Werror=unused-const-variable=]
      98 | static const u8 JC_USB_PRE_HANDSHAKE  = 0x91;
         |                 ^~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:97:17: error: 'JC_USB_RESET' defined but not used [-Werror=unused-const-variable=]
      97 | static const u8 JC_USB_RESET   = 0x06;
         |                 ^~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:96:17: error: 'JC_USB_CMD_EN_TIMEOUT' defined but not used [-Werror=unused-const-variable=]
      96 | static const u8 JC_USB_CMD_EN_TIMEOUT  = 0x05;
         |                 ^~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:92:17: error: 'JC_USB_CMD_CONN_STATUS' defined but not used [-Werror=unused-const-variable=]
      92 | static const u8 JC_USB_CMD_CONN_STATUS  = 0x01;
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:89:17: error: 'JC_FEATURE_LAUNCH' defined but not used [-Werror=unused-const-variable=]
      89 | static const u8 JC_FEATURE_LAUNCH  = 0x75;
         |                 ^~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:88:17: error: 'JC_FEATURE_MEM_WRITE' defined but not used [-Werror=unused-const-variable=]
      88 | static const u8 JC_FEATURE_MEM_WRITE  = 0x74;
         |                 ^~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:87:17: error: 'JC_FEATURE_ERASE_MEM_SECTOR' defined but not used [-Werror=unused-const-variable=]
      87 | static const u8 JC_FEATURE_ERASE_MEM_SECTOR = 0x73;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:86:17: error: 'JC_FEATURE_MEM_READ' defined but not used [-Werror=unused-const-variable=]
      86 | static const u8 JC_FEATURE_MEM_READ  = 0x72;
         |                 ^~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:85:17: error: 'JC_FEATURE_SETUP_MEM_READ' defined but not used [-Werror=unused-const-variable=]
      85 | static const u8 JC_FEATURE_SETUP_MEM_READ = 0x71;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:84:17: error: 'JC_FEATURE_OTA_FW_UPGRADE' defined but not used [-Werror=unused-const-variable=]
      84 | static const u8 JC_FEATURE_OTA_FW_UPGRADE = 0x70;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:83:17: error: 'JC_FEATURE_LAST_SUBCMD' defined but not used [-Werror=unused-const-variable=]
      83 | static const u8 JC_FEATURE_LAST_SUBCMD  = 0x02;
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:76:17: error: 'JC_INPUT_BUTTON_EVENT' defined but not used [-Werror=unused-const-variable=]
      76 | static const u8 JC_INPUT_BUTTON_EVENT  = 0x3F;
         |                 ^~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:73:17: error: 'JC_SUBCMD_GET_REGULATED_VOLTAGE' defined but not used [-Werror=unused-const-variable=]
      73 | static const u8 JC_SUBCMD_GET_REGULATED_VOLTAGE = 0x50;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:71:17: error: 'JC_SUBCMD_READ_IMU_REG' defined but not used [-Werror=unused-const-variable=]
      71 | static const u8 JC_SUBCMD_READ_IMU_REG  = 0x43;
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:70:17: error: 'JC_SUBCMD_WRITE_IMU_REG' defined but not used [-Werror=unused-const-variable=]
      70 | static const u8 JC_SUBCMD_WRITE_IMU_REG  = 0x42;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:69:17: error: 'JC_SUBCMD_SET_IMU_SENSITIVITY' defined but not used [-Werror=unused-const-variable=]
      69 | static const u8 JC_SUBCMD_SET_IMU_SENSITIVITY = 0x41;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:66:17: error: 'JC_SUBCMD_GET_PLAYER_LIGHTS' defined but not used [-Werror=unused-const-variable=]
      66 | static const u8 JC_SUBCMD_GET_PLAYER_LIGHTS = 0x31;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:64:17: error: 'JC_SUBCMD_SET_MCU_STATE' defined but not used [-Werror=unused-const-variable=]
      64 | static const u8 JC_SUBCMD_SET_MCU_STATE  = 0x22;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:63:17: error: 'JC_SUBCMD_SET_MCU_CONFIG' defined but not used [-Werror=unused-const-variable=]
      63 | static const u8 JC_SUBCMD_SET_MCU_CONFIG = 0x21;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:62:17: error: 'JC_SUBCMD_RESET_MCU' defined but not used [-Werror=unused-const-variable=]
      62 | static const u8 JC_SUBCMD_RESET_MCU  = 0x20;
         |                 ^~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:61:17: error: 'JC_SUBCMD_SPI_FLASH_WRITE' defined but not used [-Werror=unused-const-variable=]
      61 | static const u8 JC_SUBCMD_SPI_FLASH_WRITE = 0x11;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:59:17: error: 'JC_SUBCMD_LOW_POWER_MODE' defined but not used [-Werror=unused-const-variable=]
      59 | static const u8 JC_SUBCMD_LOW_POWER_MODE = 0x08;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:58:17: error: 'JC_SUBCMD_RESET_PAIRING_INFO' defined but not used [-Werror=unused-const-variable=]
      58 | static const u8 JC_SUBCMD_RESET_PAIRING_INFO = 0x07;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:57:17: error: 'JC_SUBCMD_SET_HCI_STATE' defined but not used [-Werror=unused-const-variable=]
      57 | static const u8 JC_SUBCMD_SET_HCI_STATE  = 0x06;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:56:17: error: 'JC_SUBCMD_GET_PAGE_LIST_STATE' defined but not used [-Werror=unused-const-variable=]
      56 | static const u8 JC_SUBCMD_GET_PAGE_LIST_STATE = 0x05;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:55:17: error: 'JC_SUBCMD_TRIGGERS_ELAPSED' defined but not used [-Werror=unused-const-variable=]
      55 | static const u8 JC_SUBCMD_TRIGGERS_ELAPSED = 0x04;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:52:17: error: 'JC_SUBCMD_MANUAL_BT_PAIRING' defined but not used [-Werror=unused-const-variable=]
      52 | static const u8 JC_SUBCMD_MANUAL_BT_PAIRING = 0x01;
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:51:17: error: 'JC_SUBCMD_STATE' defined but not used [-Werror=unused-const-variable=]
      51 | static const u8 JC_SUBCMD_STATE   /*= 0x00*/;
         |                 ^~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo-switch.c:47:17: error: 'JC_OUTPUT_MCU_DATA' defined but not used [-Werror=unused-const-variable=]
      47 | static const u8 JC_OUTPUT_MCU_DATA  = 0x11;
         |                 ^~~~~~~~~~~~~~~~~~


vim +1878 drivers/hid/hid-nintendo-switch.c

  1827	
  1828	static DEFINE_MUTEX(joycon_input_num_mutex);
  1829	static int joycon_leds_create(struct joycon_ctlr *ctlr)
  1830	{
  1831		struct hid_device *hdev = ctlr->hdev;
  1832		struct device *dev = &hdev->dev;
  1833		const char *d_name = dev_name(dev);
  1834		struct led_classdev *led;
  1835		char *name;
  1836		int ret = 0;
  1837		int i;
  1838		static int input_num = 1;
  1839	
  1840		/* Set the default controller player leds based on controller number */
  1841		mutex_lock(&joycon_input_num_mutex);
  1842		mutex_lock(&ctlr->output_mutex);
  1843		ret = joycon_set_player_leds(ctlr, 0, 0xF >> (4 - input_num));
  1844		if (ret)
  1845			hid_warn(ctlr->hdev, "Failed to set leds; ret=%d\n", ret);
  1846		mutex_unlock(&ctlr->output_mutex);
  1847	
  1848		/* configure the player LEDs */
  1849		for (i = 0; i < JC_NUM_LEDS; i++) {
  1850			name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s:%s",
  1851					      d_name,
  1852					      "green",
  1853					      joycon_player_led_names[i]);
  1854			if (!name)
  1855				return -ENOMEM;
  1856	
  1857			led = &ctlr->leds[i];
  1858			led->name = name;
  1859			led->brightness = ((i + 1) <= input_num) ? 1 : 0;
  1860			led->max_brightness = 1;
  1861			led->brightness_set_blocking =
  1862						joycon_player_led_brightness_set;
  1863			led->flags = LED_CORE_SUSPENDRESUME | LED_HW_PLUGGABLE;
  1864	
  1865			ret = devm_led_classdev_register(&hdev->dev, led);
  1866			if (ret) {
  1867				hid_err(hdev, "Failed registering %s LED\n", led->name);
  1868				return ret;
  1869			}
  1870		}
  1871	
  1872		if (++input_num > 4)
  1873			input_num = 1;
  1874		mutex_unlock(&joycon_input_num_mutex);
  1875	
  1876		/* configure the home LED */
  1877		if (jc_type_has_right(ctlr)) {
> 1878			name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s:%s",
  1879					      d_name,
  1880					      "blue",
  1881					      LED_FUNCTION_PLAYER5);
  1882			if (!name)
  1883				return -ENOMEM;
  1884	
  1885			led = &ctlr->home_led;
  1886			led->name = name;
  1887			led->brightness = 0;
  1888			led->max_brightness = 0xF;
  1889			led->brightness_set_blocking = joycon_home_led_brightness_set;
  1890			led->flags = LED_CORE_SUSPENDRESUME | LED_HW_PLUGGABLE;
  1891			ret = devm_led_classdev_register(&hdev->dev, led);
  1892			if (ret) {
  1893				hid_err(hdev, "Failed registering home led\n");
  1894				return ret;
  1895			}
  1896			/* Set the home LED to 0 as default state */
  1897			ret = joycon_home_led_brightness_set(led, 0);
  1898			if (ret) {
  1899				hid_err(hdev, "Failed to set home LED dflt; ret=%d\n",
  1900										ret);
  1901				return ret;
  1902			}
  1903		}
  1904	
  1905		return 0;
  1906	}
  1907	

---
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: 66028 bytes --]

  parent reply	other threads:[~2021-10-22 10:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02 23:28 [PATCH 0/4] RFC: HID: wiiu-drc: Add a driver for the Wii U gamepad Emmanuel Gil Peyrot
2021-05-02 23:28 ` [PATCH 1/4] HID: wiiu-drc: Add a driver for this gamepad Emmanuel Gil Peyrot
2021-05-05 22:33   ` Jonathan Neuschäfer
2021-05-06 10:07     ` Emmanuel Gil Peyrot
2021-05-06 10:29       ` Jonathan Neuschäfer
2021-05-06 11:53   ` Barnabás Pőcze
2021-05-02 23:28 ` [PATCH 2/4] HID: wiiu-drc: Implement touch reports Emmanuel Gil Peyrot
2021-05-05 22:43   ` Jonathan Neuschäfer
2021-05-06 10:20     ` Emmanuel Gil Peyrot
2021-05-02 23:28 ` [PATCH 3/4] HID: wiiu-drc: Add accelerometer, gyroscope and magnetometer readings Emmanuel Gil Peyrot
2021-05-02 23:28 ` [PATCH 4/4] HID: wiiu-drc: Add battery reporting Emmanuel Gil Peyrot
2021-05-06 11:45   ` Barnabás Pőcze
2021-05-19  8:59 ` [PATCH v3 0/4] HID: wiiu-drc: Add a driver for the Wii U gamepad Emmanuel Gil Peyrot
2021-05-19  8:59   ` [PATCH v3 1/4] HID: wiiu-drc: Add a driver for this gamepad Emmanuel Gil Peyrot
2021-05-19  8:59   ` [PATCH v3 2/4] HID: wiiu-drc: Implement touch reports Emmanuel Gil Peyrot
2021-05-19  8:59   ` [PATCH v3 3/4] HID: wiiu-drc: Add accelerometer, gyroscope and magnetometer readings Emmanuel Gil Peyrot
2021-05-19  8:59   ` [PATCH v3 4/4] HID: wiiu-drc: Add battery reporting Emmanuel Gil Peyrot
2021-09-21 15:08   ` [PATCH v3 0/4] HID: wiiu-drc: Add a driver for the Wii U gamepad Emmanuel Gil Peyrot
2021-10-19  9:14     ` Jiri Kosina
2021-10-19  9:27       ` Emmanuel Gil Peyrot
2021-10-19  9:30         ` Jiri Kosina
2021-10-19  9:36           ` Emmanuel Gil Peyrot
2021-11-04 11:21           ` Emmanuel Gil Peyrot
2021-11-05 17:27             ` François-Xavier Carton
2021-10-19 23:59         ` François-Xavier Carton
2021-10-20  6:24           ` Emmanuel Gil Peyrot
2021-10-19 11:04   ` [PATCH v4 0/5] HID: nintendo: Add support " Emmanuel Gil Peyrot
2021-10-19 11:04     ` [PATCH v4 1/5] HID: nintendo: split switch support into its own file Emmanuel Gil Peyrot
2021-10-22  8:32       ` kernel test robot
2021-10-22 10:25       ` kernel test robot [this message]
2021-10-19 11:04     ` [PATCH v4 2/5] HID: nintendo: drc: add support for the Wii U gamepad Emmanuel Gil Peyrot
2021-11-05 20:55       ` kernel test robot
2021-10-19 11:04     ` [PATCH v4 3/5] HID: nintendo: drc: implement touch reports Emmanuel Gil Peyrot
2021-10-19 11:04     ` [PATCH v4 4/5] HID: nintendo: drc: add accelerometer, gyroscope and magnetometer readings Emmanuel Gil Peyrot
2021-10-19 11:04     ` [PATCH v4 5/5] HID: nintendo: drc: add battery reporting Emmanuel Gil Peyrot
2021-10-27  8:10     ` [PATCH v4 0/5] HID: nintendo: Add support for the Wii U gamepad Jiri Kosina
2021-10-27 10:10     ` [PATCH v5 " Emmanuel Gil Peyrot
2021-10-27 10:10       ` [PATCH v5 1/5] HID: nintendo: split switch support into its own file Emmanuel Gil Peyrot
2021-10-27 10:10       ` [PATCH v5 2/5] HID: nintendo: drc: add support for the Wii U gamepad Emmanuel Gil Peyrot
2021-10-27 10:10       ` [PATCH v5 3/5] HID: nintendo: drc: implement touch reports Emmanuel Gil Peyrot
2021-10-27 10:10       ` [PATCH v5 4/5] HID: nintendo: drc: add accelerometer, gyroscope and magnetometer readings Emmanuel Gil Peyrot
2021-10-27 10:10       ` [PATCH v5 5/5] HID: nintendo: drc: add battery reporting Emmanuel Gil Peyrot

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=202110221813.xxu1rf2C-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ash@heyquark.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=djogorchock@gmail.com \
    --cc=j.ne@posteo.net \
    --cc=jikos@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linkmauve@linkmauve.fr \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pobrn@protonmail.com \
    /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

all inboxes | Powered by JetHome®