tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 9238e47da086f0075b28712a867544a7cda5e9e1
commit: ce0da0c8ecacc8bc0f2c71a045e9c90779614614 [40/56] BACKPORT: iio: cros_ec: Register
to cros_ec_sensorhub when EC supports FIFO
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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 checkout ce0da0c8ecacc8bc0f2c71a045e9c90779614614
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the chrome-os/chromeos-4.19 HEAD 9238e47da086f0075b28712a867544a7cda5e9e1 builds
fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:25,
from include/linux/irq.h:20,
from include/linux/iio/trigger.h:9,
from drivers/iio/light/cros_ec_light_prox.c:13:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:399:3: note: in expansion of macro 'rom_out_8'
399 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:417:3: note: in expansion of macro
'rom_out_be16'
417 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:435:3: note: in expansion of macro
'rom_out_le16'
435 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
drivers/iio/light/cros_ec_light_prox.c: In function
'cros_ec_light_prox_probe':
> drivers/iio/light/cros_ec_light_prox.c:378:27: error: expected
')' before 'cros_ec_sensors_push_data'
378 |
cros_ec_light_capture
| ^
| )
379 | cros_ec_sensors_push_data);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/iio/light/cros_ec_light_prox.c:377:8: error: too few
arguments to function 'cros_ec_sensors_core_init'
377 | ret =
cros_ec_sensors_core_init(pdev, indio_dev, true,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/iio/light/cros_ec_light_prox.c:10:
include/linux/iio/common/cros_ec_sensors_core.h:101:5: note: declared here
101 | int cros_ec_sensors_core_init(struct platform_device *pdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +378 drivers/iio/light/cros_ec_light_prox.c
363
364
365 static int cros_ec_light_prox_probe(struct platform_device *pdev)
366 {
367 struct device *dev = &pdev->dev;
368 struct iio_dev *indio_dev;
369 struct cros_ec_light_prox_state *state;
370 struct iio_chan_spec *channel;
371 int ret, i, num_channels = CROS_EC_LIGHT_PROX_MIN_CHANNELS;
372
373 indio_dev = devm_iio_device_alloc(dev, sizeof(*state));
374 if (!indio_dev)
375 return -ENOMEM;
376
377 ret = cros_ec_sensors_core_init(pdev, indio_dev, true,
378 cros_ec_light_capture
379 cros_ec_sensors_push_data);
380 if (ret)
381 return ret;
382
383 indio_dev->info = &cros_ec_light_prox_info;
384 state = iio_priv(indio_dev);
385 state->core.type = state->core.resp->info.type;
386 state->core.loc = state->core.resp->info.location;
387
388 /* Check if we need more sensors for RGB (or XYZ). */
389 state->core.param.cmd = MOTIONSENSE_CMD_INFO;
390 if (cros_ec_light_extra_send_host_cmd(&state->core, 1, 0) == 0 &&
391 state->core.resp->info.type == MOTIONSENSE_TYPE_LIGHT_RGB)
392 num_channels += CROS_EC_SENSOR_MAX_AXIS;
393
394 channel = devm_kcalloc(dev, num_channels, sizeof(*channel), 0);
395 if (channel == NULL)
396 return -ENOMEM;
397
398 indio_dev->channels = channel;
399 indio_dev->num_channels = num_channels;
400
401 cros_ec_light_channel_common(channel);
402 /* Sensor specific */
403 switch (state->core.type) {
404 case MOTIONSENSE_TYPE_LIGHT:
405 channel->type = IIO_LIGHT;
406 if (num_channels < CROS_EC_LIGHT_PROX_MIN_CHANNELS +
407 CROS_EC_SENSOR_MAX_AXIS) {
408 /* For backward compatibility. */
409 channel->info_mask_separate =
410 BIT(IIO_CHAN_INFO_PROCESSED) |
411 BIT(IIO_CHAN_INFO_CALIBBIAS) |
412 BIT(IIO_CHAN_INFO_CALIBSCALE);
413 } else {
414 /*
415 * To set a global scale, as CALIB_SCALE for RGB sensor
416 * is limited between 0 and 2.
417 */
418 channel->info_mask_shared_by_all |=
419 BIT(IIO_CHAN_INFO_SCALE);
420 }
421 break;
422 case MOTIONSENSE_TYPE_PROX:
423 channel->type = IIO_PROXIMITY;
424 break;
425 default:
426 dev_warn(dev, "Unknown motion sensor\n");
427 return -EINVAL;
428 }
429 channel++;
430
431 if (num_channels > CROS_EC_LIGHT_PROX_MIN_CHANNELS) {
432 for (i = CROS_EC_SENSOR_X; i < CROS_EC_SENSOR_MAX_AXIS;
433 i++, channel++) {
434 cros_ec_light_channel_common(channel);
435 channel->scan_index = i + 1;
436 channel->modified = 1;
437 channel->channel2 = IIO_MOD_LIGHT_RED + i;
438 channel->type = IIO_LIGHT;
439 }
440 }
441
442 /* Timestamp */
443 channel->type = IIO_TIMESTAMP;
444 channel->channel = -1;
445 channel->scan_index = num_channels - 1;
446 channel->scan_type.sign = 's';
447 channel->scan_type.realbits = 64;
448 channel->scan_type.storagebits = 64;
449
450 state->core.read_ec_sensors_data = cros_ec_sensors_read_cmd;
451
452 return devm_iio_device_register(dev, indio_dev);
453 }
454
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org