* [android-common:android-4.4-p 1/1] drivers/hid/hid-nintendo.c:643:13: warning: comparison between signed and unsigned integer expressions
@ 2020-10-21 22:31 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-21 22:31 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 13017 bytes --]
tree: https://android.googlesource.com/kernel/common android-4.4-p
head: 4db1ebdd40ec0b6ee8fb5744b20274a37aea267d
commit: 4db1ebdd40ec0b6ee8fb5744b20274a37aea267d [1/1] FROMLIST: HID: nintendo: add nintendo switch controller driver
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.4-p
git checkout 4db1ebdd40ec0b6ee8fb5744b20274a37aea267d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=arm64
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 >>):
In file included from arch/arm64/include/asm/alternative.h:4:0,
from arch/arm64/include/asm/lse.h:7,
from arch/arm64/include/asm/atomic.h:27,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from include/linux/lockdep.h:23,
from include/linux/spinlock_types.h:18,
from include/linux/mutex.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from drivers/hid/hid-nintendo.c:25:
arch/arm64/include/asm/cpufeature.h: In function 'cpuid_feature_extract_field':
arch/arm64/include/asm/cpufeature.h:161:55: warning: signed and unsigned type in conditional expression [-Wsign-compare]
cpuid_feature_extract_signed_field(features, field) :
^
In file included from arch/arm64/include/asm/bug.h:67:0,
from include/linux/bug.h:4,
from arch/arm64/include/asm/cmpxchg.h:21,
from arch/arm64/include/asm/atomic.h:41,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from include/linux/lockdep.h:23,
from include/linux/spinlock_types.h:18,
from include/linux/mutex.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from drivers/hid/hid-nintendo.c:25:
include/linux/cpumask.h: In function 'cpumask_check':
include/linux/cpumask.h:117:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
^
include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
int __ret_warn_once = !!(condition); \
^~~~~~~~~
In file included from arch/arm64/include/asm/compat.h:25:0,
from arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/sysfs.h:21,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from drivers/hid/hid-nintendo.c:25:
include/linux/sched.h: At top level:
include/linux/sched.h:1211:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^~~~~
drivers/hid/hid-nintendo.c: In function 'joycon_ctlr_handle_event':
>> drivers/hid/hid-nintendo.c:643:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (size < sizeof(struct joycon_input_report) ||
^
At top level:
drivers/hid/hid-nintendo.c:92:17: warning: 'JC_USB_SEND_UART' defined but not used [-Wunused-const-variable=]
static const u8 JC_USB_SEND_UART = 0x92;
^~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:91:17: warning: 'JC_USB_PRE_HANDSHAKE' defined but not used [-Wunused-const-variable=]
static const u8 JC_USB_PRE_HANDSHAKE = 0x91;
^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:90:17: warning: 'JC_USB_RESET' defined but not used [-Wunused-const-variable=]
static const u8 JC_USB_RESET = 0x06;
^~~~~~~~~~~~
drivers/hid/hid-nintendo.c:89:17: warning: 'JC_USB_CMD_EN_TIMEOUT' defined but not used [-Wunused-const-variable=]
static const u8 JC_USB_CMD_EN_TIMEOUT = 0x05;
^~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:85:17: warning: 'JC_USB_CMD_CONN_STATUS' defined but not used [-Wunused-const-variable=]
static const u8 JC_USB_CMD_CONN_STATUS = 0x01;
^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:82:17: warning: 'JC_FEATURE_LAUNCH' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_LAUNCH = 0x75;
^~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:81:17: warning: 'JC_FEATURE_MEM_WRITE' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_MEM_WRITE = 0x74;
^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:80:17: warning: 'JC_FEATURE_ERASE_MEM_SECTOR' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_ERASE_MEM_SECTOR = 0x73;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:79:17: warning: 'JC_FEATURE_MEM_READ' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_MEM_READ = 0x72;
^~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:78:17: warning: 'JC_FEATURE_SETUP_MEM_READ' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_SETUP_MEM_READ = 0x71;
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:77:17: warning: 'JC_FEATURE_OTA_FW_UPGRADE' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_OTA_FW_UPGRADE = 0x70;
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:76:17: warning: 'JC_FEATURE_LAST_SUBCMD' defined but not used [-Wunused-const-variable=]
static const u8 JC_FEATURE_LAST_SUBCMD = 0x02;
^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:69:17: warning: 'JC_INPUT_BUTTON_EVENT' defined but not used [-Wunused-const-variable=]
static const u8 JC_INPUT_BUTTON_EVENT = 0x3F;
^~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:66:17: warning: 'JC_SUBCMD_GET_REGULATED_VOLTAGE' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_GET_REGULATED_VOLTAGE = 0x50;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:65:17: warning: 'JC_SUBCMD_ENABLE_VIBRATION' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_ENABLE_VIBRATION = 0x48;
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:64:17: warning: 'JC_SUBCMD_READ_IMU_REG' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_READ_IMU_REG = 0x43;
^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:63:17: warning: 'JC_SUBCMD_WRITE_IMU_REG' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_WRITE_IMU_REG = 0x42;
^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:62:17: warning: 'JC_SUBCMD_SET_IMU_SENSITIVITY' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_SET_IMU_SENSITIVITY = 0x41;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:61:17: warning: 'JC_SUBCMD_ENABLE_IMU' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_ENABLE_IMU = 0x40;
^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:60:17: warning: 'JC_SUBCMD_SET_HOME_LIGHT' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_SET_HOME_LIGHT = 0x38;
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:59:17: warning: 'JC_SUBCMD_GET_PLAYER_LIGHTS' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_GET_PLAYER_LIGHTS = 0x31;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:57:17: warning: 'JC_SUBCMD_SET_MCU_STATE' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_SET_MCU_STATE = 0x22;
^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:56:17: warning: 'JC_SUBCMD_SET_MCU_CONFIG' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_SET_MCU_CONFIG = 0x21;
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:55:17: warning: 'JC_SUBCMD_RESET_MCU' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_RESET_MCU = 0x20;
^~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:54:17: warning: 'JC_SUBCMD_SPI_FLASH_WRITE' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_SPI_FLASH_WRITE = 0x11;
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:52:17: warning: 'JC_SUBCMD_LOW_POWER_MODE' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_LOW_POWER_MODE = 0x08;
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:51:17: warning: 'JC_SUBCMD_RESET_PAIRING_INFO' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_RESET_PAIRING_INFO = 0x07;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:50:17: warning: 'JC_SUBCMD_SET_HCI_STATE' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_SET_HCI_STATE = 0x06;
^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:49:17: warning: 'JC_SUBCMD_GET_PAGE_LIST_STATE' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_GET_PAGE_LIST_STATE = 0x05;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:48:17: warning: 'JC_SUBCMD_TRIGGERS_ELAPSED' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_TRIGGERS_ELAPSED = 0x04;
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:46:17: warning: 'JC_SUBCMD_REQ_DEV_INFO' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_REQ_DEV_INFO = 0x02;
^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:45:17: warning: 'JC_SUBCMD_MANUAL_BT_PAIRING' defined but not used [-Wunused-const-variable=]
static const u8 JC_SUBCMD_MANUAL_BT_PAIRING = 0x01;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:44:17: warning: 'JC_SUBCMD_STATE' defined but not used [-Wunused-const-variable=]
vim +643 drivers/hid/hid-nintendo.c
624
625 static int joycon_ctlr_handle_event(struct joycon_ctlr *ctlr, u8 *data,
626 int size)
627 {
628 int ret = 0;
629 bool match = false;
630 struct joycon_input_report *report;
631
632 if (unlikely(mutex_is_locked(&ctlr->output_mutex)) &&
633 ctlr->msg_type != JOYCON_MSG_TYPE_NONE) {
634 switch (ctlr->msg_type) {
635 case JOYCON_MSG_TYPE_USB:
636 if (size < 2)
637 break;
638 if (data[0] == JC_INPUT_USB_RESPONSE &&
639 data[1] == ctlr->usb_ack_match)
640 match = true;
641 break;
642 case JOYCON_MSG_TYPE_SUBCMD:
> 643 if (size < sizeof(struct joycon_input_report) ||
644 data[0] != JC_INPUT_SUBCMD_REPLY)
645 break;
646 report = (struct joycon_input_report *)data;
647 if (report->reply.id == ctlr->subcmd_ack_match)
648 match = true;
649 break;
650 default:
651 break;
652 }
653
654 if (match) {
655 memcpy(ctlr->input_buf, data,
656 min(size, (int)JC_MAX_RESP_SIZE));
657 ctlr->msg_type = JOYCON_MSG_TYPE_NONE;
658 ctlr->received_resp = true;
659 wake_up(&ctlr->wait);
660
661 /* This message has been handled */
662 return 1;
663 }
664 }
665
666 if (ctlr->ctlr_state == JOYCON_CTLR_STATE_READ)
667 ret = joycon_ctlr_read_handler(ctlr, data, size);
668
669 return ret;
670 }
671
---
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: 47660 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-21 22:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-21 22:31 [android-common:android-4.4-p 1/1] drivers/hid/hid-nintendo.c:643:13: warning: comparison between signed and unsigned integer expressions kernel test robot
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.