From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2594C25B08 for ; Sat, 20 Aug 2022 14:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346310AbiHTOYC (ORCPT ); Sat, 20 Aug 2022 10:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346217AbiHTOXx (ORCPT ); Sat, 20 Aug 2022 10:23:53 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D13B1C13B for ; Sat, 20 Aug 2022 07:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661005433; x=1692541433; h=date:from:to:cc:subject:message-id:mime-version; bh=2eoWGW5RTsfp6wncHXLsru9x/II2kVDL7PVh7uQDKkc=; b=KMrmnowXTg//FXw7sMKTGcQuiZt/wIPo0iawGdNA6Ymksm7rK57AvWMw AXoETzLok/VPNyyr0ccK01h2Ef0AGa0FZJcOFZvmbYjtevDuirjvrZyFC fym3IOPeaaCKfU4/xRn5NVikt6kBKgbsV0GtLjM/gcwkk0MEdaFb7JyIz zTIxHjQv5HpT9NF3362/U1AksAefsC55X6caYmIOB5xj91B15QjNUjRMJ Qwp0s11+xM9pjsKbx4FDF7b2JqNsDOTNDikq4/EgIxNq0tvfGJGTsy4Yq O3dLLe3Tig2LzDBGIBjo2V3c4fgpd4sOBbN9IG0fP8ivZuIWbS4655hoM w==; X-IronPort-AV: E=McAfee;i="6500,9779,10445"; a="290739825" X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="290739825" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2022 07:23:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="584979042" Received: from lkp-server01.sh.intel.com (HELO 44b6dac04a33) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 20 Aug 2022 07:23:51 -0700 Received: from kbuild by 44b6dac04a33 with local (Exim 4.96) (envelope-from ) id 1oPPOA-0002mN-2u; Sat, 20 Aug 2022 14:23:50 +0000 Date: Sat, 20 Aug 2022 22:23:06 +0800 From: kernel test robot To: Hector Martin Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: [asahilinux:bits/090-spi-hid 17/22] drivers/hid/dockchannel-hid/dockchannel-hid.c:303:28: error: implicit declaration of function 'FIELD_PREP' Message-ID: <202208202234.aXbQ3aiF-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://github.com/AsahiLinux/linux bits/090-spi-hid head: 480924e97dddd088c4ed360eb12ecf92a30f19b1 commit: 1d801ad9c4b08a5675701e82f600d9f462211a79 [17/22] hid: Add Apple DockChannel HID transport driver config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220820/202208202234.aXbQ3aiF-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/1d801ad9c4b08a5675701e82f600d9f462211a79 git remote add asahilinux https://github.com/AsahiLinux/linux git fetch --no-tags asahilinux bits/090-spi-hid git checkout 1d801ad9c4b08a5675701e82f600d9f462211a79 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dchid_cmd': >> drivers/hid/dockchannel-hid/dockchannel-hid.c:303:28: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration] 303 | iface->out_flags = FIELD_PREP(FLAGS_GROUP, type) | FIELD_PREP(FLAGS_REQ, req); | ^~~~~~~~~~ In file included from include/linux/device.h:15, from drivers/hid/dockchannel-hid/dockchannel-hid.c:10: drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dchid_handle_ready': drivers/hid/dockchannel-hid/dockchannel-hid.c:569:37: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 569 | dev_err(dchid->dev, "Bad length for ready message: %ld\n", length); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/hid/dockchannel-hid/dockchannel-hid.c:569:17: note: in expansion of macro 'dev_err' 569 | dev_err(dchid->dev, "Bad length for ready message: %ld\n", length); | ^~~~~~~ drivers/hid/dockchannel-hid/dockchannel-hid.c:569:70: note: format string is defined here 569 | dev_err(dchid->dev, "Bad length for ready message: %ld\n", length); | ~~^ | | | long int | %d drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dchid_packet_work': >> drivers/hid/dockchannel-hid/dockchannel-hid.c:825:20: error: implicit declaration of function 'FIELD_GET'; did you mean 'FOLL_GET'? [-Werror=implicit-function-declaration] 825 | int type = FIELD_GET(FLAGS_GROUP, shdr->flags); | ^~~~~~~~~ | FOLL_GET drivers/hid/dockchannel-hid/dockchannel-hid.c:829:37: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=] 829 | dev_err(dchid->dev, "Bad sub header length (%d > %ld)\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/hid/dockchannel-hid/dockchannel-hid.c:829:17: note: in expansion of macro 'dev_err' 829 | dev_err(dchid->dev, "Bad sub header length (%d > %ld)\n", | ^~~~~~~ drivers/hid/dockchannel-hid/dockchannel-hid.c:829:68: note: format string is defined here 829 | dev_err(dchid->dev, "Bad sub header length (%d > %ld)\n", | ~~^ | | | long int | %d drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dchid_handle_ack': drivers/hid/dockchannel-hid/dockchannel-hid.c:855:44: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=] 855 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt' 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/hid/dockchannel-hid/dockchannel-hid.c:855:17: note: in expansion of macro 'dev_err' 855 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n", | ^~~~~~~ drivers/hid/dockchannel-hid/dockchannel-hid.c:855:75: note: format string is defined here 855 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n", | ~~^ | | | long int | %d drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dockchannel_hid_probe': drivers/hid/dockchannel-hid/dockchannel-hid.c:975:14: warning: variable 'defer' set but not used [-Wunused-but-set-variable] 975 | bool defer = false; | ^~~~~ cc1: some warnings being treated as errors vim +/FIELD_PREP +303 drivers/hid/dockchannel-hid/dockchannel-hid.c 292 293 static int dchid_cmd(struct dchid_iface *iface, u32 type, u32 req, 294 void *data, size_t size, void *resp_buf, size_t resp_size) 295 { 296 int ret; 297 int report_id = *(u8*)data; 298 299 mutex_lock(&iface->out_mutex); 300 301 WARN_ON(iface->out_report != -1); 302 iface->out_report = report_id; > 303 iface->out_flags = FIELD_PREP(FLAGS_GROUP, type) | FIELD_PREP(FLAGS_REQ, req); 304 iface->resp_buf = resp_buf; 305 iface->resp_size = resp_size; 306 reinit_completion(&iface->out_complete); 307 308 ret = dchid_send(iface, iface->out_flags, data, size); 309 if (ret < 0) 310 goto done; 311 312 if (!wait_for_completion_timeout(&iface->out_complete, msecs_to_jiffies(1000))) { 313 dev_err(iface->dchid->dev, "output report 0x%x to iface %d (%s) timed out\n", 314 report_id, iface->index, iface->name); 315 ret = -ETIMEDOUT; 316 goto done; 317 } 318 319 ret = iface->resp_size; 320 if (iface->retcode) { 321 dev_err(iface->dchid->dev, 322 "output report 0x%x to iface %d (%s) failed with err 0x%x\n", 323 report_id, iface->index, iface->name, iface->retcode); 324 ret = -EIO; 325 } 326 327 done: 328 iface->tx_seq++; 329 iface->out_report = -1; 330 iface->out_flags = 0; 331 iface->resp_buf = NULL; 332 iface->resp_size = 0; 333 mutex_unlock(&iface->out_mutex); 334 return ret; 335 } 336 -- 0-DAY CI Kernel Test Service https://01.org/lkp