lkml.org 
[lkml]   [2022]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[asahilinux:bits/090-spi-hid 17/18] drivers/hid/dockchannel-hid/dockchannel-hid.c:304:28: error: implicit declaration of function 'FIELD_PREP'
tree:   https://github.com/AsahiLinux/linux bits/090-spi-hid
head: 2902ed1bd2d6ac439a835c53841122c7f3455a6c
commit: e24c3dd5875015f606e146e07ede25ae4d866fcc [17/18] hid: Add Apple DockChannel HID transport driver
config: openrisc-randconfig-c032-20220715 (https://download.01.org/0day-ci/archive/20220717/202207170409.ZBilnoON-lkp@intel.com/config)
compiler: or1k-linux-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/e24c3dd5875015f606e146e07ede25ae4d866fcc
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/090-spi-hid
git checkout e24c3dd5875015f606e146e07ede25ae4d866fcc
# 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=openrisc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dchid_cmd':
>> drivers/hid/dockchannel-hid/dockchannel-hid.c:304:28: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
304 | 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:570:37: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
570 | 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:570:17: note: in expansion of macro 'dev_err'
570 | dev_err(dchid->dev, "Bad length for ready message: %ld\n", length);
| ^~~~~~~
drivers/hid/dockchannel-hid/dockchannel-hid.c:570:70: note: format string is defined here
570 | 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:826:20: error: implicit declaration of function 'FIELD_GET'; did you mean 'FOLL_GET'? [-Werror=implicit-function-declaration]
826 | int type = FIELD_GET(FLAGS_GROUP, shdr->flags);
| ^~~~~~~~~
| FOLL_GET
drivers/hid/dockchannel-hid/dockchannel-hid.c:830:37: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=]
830 | 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:830:17: note: in expansion of macro 'dev_err'
830 | dev_err(dchid->dev, "Bad sub header length (%d > %ld)\n",
| ^~~~~~~
drivers/hid/dockchannel-hid/dockchannel-hid.c:830:68: note: format string is defined here
830 | 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:856:44: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=]
856 | 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:856:17: note: in expansion of macro 'dev_err'
856 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n",
| ^~~~~~~
drivers/hid/dockchannel-hid/dockchannel-hid.c:856:75: note: format string is defined here
856 | 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:976:14: warning: variable 'defer' set but not used [-Wunused-but-set-variable]
976 | bool defer = false;
| ^~~~~
cc1: some warnings being treated as errors


vim +/FIELD_PREP +304 drivers/hid/dockchannel-hid/dockchannel-hid.c

293
294 static int dchid_cmd(struct dchid_iface *iface, u32 type, u32 req,
295 void *data, size_t size, void *resp_buf, size_t resp_size)
296 {
297 int ret;
298 int report_id = *(u8*)data;
299
300 mutex_lock(&iface->out_mutex);
301
302 WARN_ON(iface->out_report != -1);
303 iface->out_report = report_id;
> 304 iface->out_flags = FIELD_PREP(FLAGS_GROUP, type) | FIELD_PREP(FLAGS_REQ, req);
305 iface->resp_buf = resp_buf;
306 iface->resp_size = resp_size;
307 reinit_completion(&iface->out_complete);
308
309 ret = dchid_send(iface, iface->out_flags, data, size);
310 if (ret < 0)
311 goto done;
312
313 if (!wait_for_completion_timeout(&iface->out_complete, msecs_to_jiffies(1000))) {
314 dev_err(iface->dchid->dev, "output report 0x%x to iface %d (%s) timed out\n",
315 report_id, iface->index, iface->name);
316 ret = -ETIMEDOUT;
317 goto done;
318 }
319
320 ret = iface->resp_size;
321 if (iface->retcode) {
322 dev_err(iface->dchid->dev,
323 "output report 0x%x to iface %d (%s) failed with err 0x%x\n",
324 report_id, iface->index, iface->name, iface->retcode);
325 ret = -EIO;
326 }
327
328 done:
329 iface->tx_seq++;
330 iface->out_report = -1;
331 iface->out_flags = 0;
332 iface->resp_buf = NULL;
333 iface->resp_size = 0;
334 mutex_unlock(&iface->out_mutex);
335 return ret;
336 }
337

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-07-16 22:57    [W:0.039 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site