From: kbuild test robot <lkp@intel.com> To: Gwendal Grignou <gwendal@chromium.org>, enric.balletbo@collabora.com, jic23@kernel.org Cc: kbuild-all@lists.01.org, bleung@chromium.org, groeck@chromium.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Gwendal Grignou <gwendal@chromium.org> Subject: Re: [PATCH v2 3/3] iio: cros_ec_light: Add support for RGB sensor Date: Mon, 11 May 2020 14:31:09 +0800 [thread overview] Message-ID: <202005111425.AoUFxet5%lkp@intel.com> (raw) In-Reply-To: <20200506230324.139241-4-gwendal@chromium.org> [-- Attachment #1: Type: text/plain, Size: 10588 bytes --] Hi Gwendal, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iio/togreg] [also build test WARNING on chrome-platform-linux/for-next linus/master v5.7-rc5 next-20200508] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Gwendal-Grignou/iio-cros_ec-Add-support-for-RGB-light-sensor/20200507-074251 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg config: i386-randconfig-a003-20200511 (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:51:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: error: initializer element is not constant #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:51:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: note: (near initialization for 'cros_ec_light_prox_bitmasks[3]') #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:51:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:52:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK | CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: error: initializer element is not constant #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:52:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK | CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: note: (near initialization for 'cros_ec_light_prox_bitmasks[4]') #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:52:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK | CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/dev_printk.h:14:0, from include/linux/device.h:15, from drivers/iio/light/cros_ec_light_prox.c:8: drivers/iio/light/cros_ec_light_prox.c: In function 'cros_ec_light_capture': drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ >> drivers/iio/light/cros_ec_light_prox.c:403:2: note: in expansion of macro 'if' if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || ^~ drivers/iio/light/cros_ec_light_prox.c:404:19: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ >> drivers/iio/light/cros_ec_light_prox.c:403:2: note: in expansion of macro 'if' if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || ^~ drivers/iio/light/cros_ec_light_prox.c:404:19: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value' (cond) ? \ ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~~~~~~~~~~~ >> drivers/iio/light/cros_ec_light_prox.c:403:2: note: in expansion of macro 'if' if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || ^~ drivers/iio/light/cros_ec_light_prox.c:404:19: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c: In function 'cros_ec_light_prox_update_scan_mode': drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/iio/light/cros_ec_light_prox.c:434:7: note: in expansion of macro 'if' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~ drivers/iio/light/cros_ec_light_prox.c:434:24: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/iio/light/cros_ec_light_prox.c:434:7: note: in expansion of macro 'if' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~ drivers/iio/light/cros_ec_light_prox.c:434:24: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value' (cond) ? \ ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:434:7: note: in expansion of macro 'if' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~ drivers/iio/light/cros_ec_light_prox.c:434:24: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/if +403 drivers/iio/light/cros_ec_light_prox.c 378 379 static irqreturn_t cros_ec_light_capture(int irq, void *p) 380 { 381 struct iio_poll_func *pf = p; 382 struct iio_dev *indio_dev = pf->indio_dev; 383 struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); 384 int ret, i, idx = 0; 385 s16 data; 386 const unsigned long scan_mask = *indio_dev->active_scan_mask; 387 388 mutex_lock(&st->cmd_lock); 389 390 /* Clear capture data. */ 391 memset(st->samples, 0, indio_dev->scan_bytes); 392 393 /* Read first channel. */ 394 ret = cros_ec_sensors_read_cmd(indio_dev, 1, &data); 395 if (ret < 0) { 396 mutex_unlock(&st->cmd_lock); 397 goto done; 398 } 399 if (scan_mask & CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK) 400 ((s16 *)st->samples)[idx++] = data; 401 402 /* Read remaining channels. */ > 403 if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || 404 (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { 405 ret = cros_ec_light_extra_send_host_cmd( 406 st, 1, sizeof(st->resp->data)); 407 if (ret < 0) { 408 mutex_unlock(&st->cmd_lock); 409 goto done; 410 } 411 for (i = 0; i < CROS_EC_SENSOR_MAX_AXIS; i++) 412 ((s16 *)st->samples)[idx++] = st->resp->data.data[i]; 413 } 414 mutex_unlock(&st->cmd_lock); 415 416 iio_push_to_buffers_with_timestamp(indio_dev, st->samples, 417 iio_get_time_ns(indio_dev)); 418 419 done: 420 iio_trigger_notify_done(indio_dev->trig); 421 422 return IRQ_HANDLED; 423 } 424 --- 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: 32469 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH v2 3/3] iio: cros_ec_light: Add support for RGB sensor Date: Mon, 11 May 2020 14:31:09 +0800 [thread overview] Message-ID: <202005111425.AoUFxet5%lkp@intel.com> (raw) In-Reply-To: <20200506230324.139241-4-gwendal@chromium.org> [-- Attachment #1: Type: text/plain, Size: 10786 bytes --] Hi Gwendal, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iio/togreg] [also build test WARNING on chrome-platform-linux/for-next linus/master v5.7-rc5 next-20200508] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Gwendal-Grignou/iio-cros_ec-Add-support-for-RGB-light-sensor/20200507-074251 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg config: i386-randconfig-a003-20200511 (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:51:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: error: initializer element is not constant #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:51:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: note: (near initialization for 'cros_ec_light_prox_bitmasks[3]') #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:51:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:52:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK | CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: error: initializer element is not constant #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:52:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK | CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:38: note: (near initialization for 'cros_ec_light_prox_bitmasks[4]') #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ drivers/iio/light/cros_ec_light_prox.c:52:2: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' CROS_EC_LIGHT_RGB_SPACE_MASK | CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/dev_printk.h:14:0, from include/linux/device.h:15, from drivers/iio/light/cros_ec_light_prox.c:8: drivers/iio/light/cros_ec_light_prox.c: In function 'cros_ec_light_capture': drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ >> drivers/iio/light/cros_ec_light_prox.c:403:2: note: in expansion of macro 'if' if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || ^~ drivers/iio/light/cros_ec_light_prox.c:404:19: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ >> drivers/iio/light/cros_ec_light_prox.c:403:2: note: in expansion of macro 'if' if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || ^~ drivers/iio/light/cros_ec_light_prox.c:404:19: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value' (cond) ? \ ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~~~~~~~~~~~ >> drivers/iio/light/cros_ec_light_prox.c:403:2: note: in expansion of macro 'if' if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || ^~ drivers/iio/light/cros_ec_light_prox.c:404:19: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c: In function 'cros_ec_light_prox_update_scan_mode': drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/iio/light/cros_ec_light_prox.c:434:7: note: in expansion of macro 'if' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~ drivers/iio/light/cros_ec_light_prox.c:434:24: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/iio/light/cros_ec_light_prox.c:434:7: note: in expansion of macro 'if' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~ drivers/iio/light/cros_ec_light_prox.c:434:24: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:39:40: warning: left-hand operand of comma expression has no effect [-Wunused-value] #define CROS_EC_LIGHT_RGB_SPACE_MASK (6, 4) ^ include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value' (cond) ? \ ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~~~~~~~~~~~ drivers/iio/light/cros_ec_light_prox.c:434:7: note: in expansion of macro 'if' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~ drivers/iio/light/cros_ec_light_prox.c:434:24: note: in expansion of macro 'CROS_EC_LIGHT_RGB_SPACE_MASK' else if (*scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/if +403 drivers/iio/light/cros_ec_light_prox.c 378 379 static irqreturn_t cros_ec_light_capture(int irq, void *p) 380 { 381 struct iio_poll_func *pf = p; 382 struct iio_dev *indio_dev = pf->indio_dev; 383 struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); 384 int ret, i, idx = 0; 385 s16 data; 386 const unsigned long scan_mask = *indio_dev->active_scan_mask; 387 388 mutex_lock(&st->cmd_lock); 389 390 /* Clear capture data. */ 391 memset(st->samples, 0, indio_dev->scan_bytes); 392 393 /* Read first channel. */ 394 ret = cros_ec_sensors_read_cmd(indio_dev, 1, &data); 395 if (ret < 0) { 396 mutex_unlock(&st->cmd_lock); 397 goto done; 398 } 399 if (scan_mask & CROS_EC_LIGHT_CLEAR_OR_PROXIMITY_MASK) 400 ((s16 *)st->samples)[idx++] = data; 401 402 /* Read remaining channels. */ > 403 if ((scan_mask & CROS_EC_LIGHT_XYZ_SPACE_MASK) || 404 (scan_mask & CROS_EC_LIGHT_RGB_SPACE_MASK)) { 405 ret = cros_ec_light_extra_send_host_cmd( 406 st, 1, sizeof(st->resp->data)); 407 if (ret < 0) { 408 mutex_unlock(&st->cmd_lock); 409 goto done; 410 } 411 for (i = 0; i < CROS_EC_SENSOR_MAX_AXIS; i++) 412 ((s16 *)st->samples)[idx++] = st->resp->data.data[i]; 413 } 414 mutex_unlock(&st->cmd_lock); 415 416 iio_push_to_buffers_with_timestamp(indio_dev, st->samples, 417 iio_get_time_ns(indio_dev)); 418 419 done: 420 iio_trigger_notify_done(indio_dev->trig); 421 422 return IRQ_HANDLED; 423 } 424 --- 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: 32469 bytes --]
next prev parent reply other threads:[~2020-05-11 6:58 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-06 23:03 [PATCH v3 0/3] iio: cros_ec: Add support for RGB light sensor Gwendal Grignou 2020-05-06 23:03 ` [PATCH v2 1/3] iio: Add in_illumincance vectors in different color spaces Gwendal Grignou 2020-05-08 15:16 ` Jonathan Cameron 2020-05-12 4:10 ` Gwendal Grignou 2020-05-16 15:49 ` Jonathan Cameron 2020-05-06 23:03 ` [PATCH v2 2/3] iio: cros_ec: Allow enabling/disabling calibration mode Gwendal Grignou 2020-05-06 23:03 ` [PATCH v2 3/3] iio: cros_ec_light: Add support for RGB sensor Gwendal Grignou 2020-05-08 15:23 ` Jonathan Cameron 2020-05-11 2:34 ` kbuild test robot 2020-05-11 2:34 ` kbuild test robot 2020-05-11 6:31 ` kbuild test robot [this message] 2020-05-11 6:31 ` kbuild test robot 2020-05-08 14:56 ` [PATCH v3 0/3] iio: cros_ec: Add support for RGB light sensor Jonathan Cameron
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=202005111425.AoUFxet5%lkp@intel.com \ --to=lkp@intel.com \ --cc=bleung@chromium.org \ --cc=enric.balletbo@collabora.com \ --cc=groeck@chromium.org \ --cc=gwendal@chromium.org \ --cc=jic23@kernel.org \ --cc=kbuild-all@lists.01.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.