linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mihail Chindris <mihail.chindris@analog.com>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
	nuno.sa@analog.com, dragos.bogdan@analog.com,
	alexandru.ardelean@analog.com
Subject: Re: [PATCH v4 3/6] iio: triggered-buffer: extend support to configure output buffers
Date: Sat, 21 Aug 2021 11:28:42 +0800	[thread overview]
Message-ID: <202108211108.gg3rDN7b-lkp@intel.com> (raw)
In-Reply-To: <20210820165927.4524-4-mihail.chindris@analog.com>

[-- Attachment #1: Type: text/plain, Size: 8928 bytes --]

Hi Mihail,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 94a853eca720ac9e385e59f27e859b4a01123f58]

url:    https://github.com/0day-ci/linux/commits/Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349
base:   94a853eca720ac9e385e59f27e859b4a01123f58
config: i386-randconfig-a002-20210821 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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/0day-ci/linux/commit/864c7d5f5d135f37baf9b65d13d186744535a8e4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mihail-Chindris/iio-Add-output-buffer-support-and-DAC-example/20210821-010349
        git checkout 864c7d5f5d135f37baf9b65d13d186744535a8e4
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
   In file included from drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c:9:
   In file included from include/linux/device.h:15:
   In file included from include/linux/dev_printk.h:16:
   In file included from include/linux/ratelimit.h:6:
   In file included from include/linux/sched.h:14:
   In file included from include/linux/pid.h:5:
   In file included from include/linux/rculist.h:11:
   In file included from include/linux/rcupdate.h:27:
   In file included from include/linux/preempt.h:78:
   In file included from arch/x86/include/asm/preempt.h:7:
   In file included from include/linux/thread_info.h:60:
   arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
           oldframe = __builtin_frame_address(1);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
                   frame = __builtin_frame_address(2);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c:57:41: warning: taking address of packed member 'msg' of class or structure '' may result in an unaligned pointer value [-Waddress-of-packed-member]
           ret = cros_ec_cmd_xfer_status(ec_dev, &buf.msg);
                                                  ^~~~~~~
>> drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c:365:35: error: too few arguments to function call, expected 7, have 6
                                           IIO_BUFFER_DIRECTION_IN, NULL);
                                                                        ^
   include/linux/iio/triggered_buffer.h:25:5: note: 'devm_iio_triggered_buffer_setup_ext' declared here
   int devm_iio_triggered_buffer_setup_ext(struct device *dev,
       ^
   3 warnings and 1 error generated.


vim +365 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c

   234	
   235	/**
   236	 * cros_ec_sensors_core_init() - basic initialization of the core structure
   237	 * @pdev:		platform device created for the sensors
   238	 * @indio_dev:		iio device structure of the device
   239	 * @physical_device:	true if the device refers to a physical device
   240	 * @trigger_capture:    function pointer to call buffer is triggered,
   241	 *    for backward compatibility.
   242	 * @push_data:          function to call when cros_ec_sensorhub receives
   243	 *    a sample for that sensor.
   244	 *
   245	 * Return: 0 on success, -errno on failure.
   246	 */
   247	int cros_ec_sensors_core_init(struct platform_device *pdev,
   248				      struct iio_dev *indio_dev,
   249				      bool physical_device,
   250				      cros_ec_sensors_capture_t trigger_capture,
   251				      cros_ec_sensorhub_push_data_cb_t push_data)
   252	{
   253		struct device *dev = &pdev->dev;
   254		struct cros_ec_sensors_core_state *state = iio_priv(indio_dev);
   255		struct cros_ec_sensorhub *sensor_hub = dev_get_drvdata(dev->parent);
   256		struct cros_ec_dev *ec = sensor_hub->ec;
   257		struct cros_ec_sensor_platform *sensor_platform = dev_get_platdata(dev);
   258		u32 ver_mask, temp;
   259		int frequencies[ARRAY_SIZE(state->frequencies) / 2] = { 0 };
   260		int ret, i;
   261	
   262		platform_set_drvdata(pdev, indio_dev);
   263	
   264		state->ec = ec->ec_dev;
   265		state->msg = devm_kzalloc(&pdev->dev,
   266					max((u16)sizeof(struct ec_params_motion_sense),
   267					state->ec->max_response), GFP_KERNEL);
   268		if (!state->msg)
   269			return -ENOMEM;
   270	
   271		state->resp = (struct ec_response_motion_sense *)state->msg->data;
   272	
   273		mutex_init(&state->cmd_lock);
   274	
   275		ret = cros_ec_get_host_cmd_version_mask(state->ec,
   276							ec->cmd_offset,
   277							EC_CMD_MOTION_SENSE_CMD,
   278							&ver_mask);
   279		if (ret < 0)
   280			return ret;
   281	
   282		/* Set up the host command structure. */
   283		state->msg->version = fls(ver_mask) - 1;
   284		state->msg->command = EC_CMD_MOTION_SENSE_CMD + ec->cmd_offset;
   285		state->msg->outsize = sizeof(struct ec_params_motion_sense);
   286	
   287		indio_dev->name = pdev->name;
   288	
   289		if (physical_device) {
   290			state->param.cmd = MOTIONSENSE_CMD_INFO;
   291			state->param.info.sensor_num = sensor_platform->sensor_num;
   292			ret = cros_ec_motion_send_host_cmd(state, 0);
   293			if (ret) {
   294				dev_warn(dev, "Can not access sensor info\n");
   295				return ret;
   296			}
   297			state->type = state->resp->info.type;
   298			state->loc = state->resp->info.location;
   299	
   300			/* Set sign vector, only used for backward compatibility. */
   301			memset(state->sign, 1, CROS_EC_SENSOR_MAX_AXIS);
   302	
   303			for (i = CROS_EC_SENSOR_X; i < CROS_EC_SENSOR_MAX_AXIS; i++)
   304				state->calib[i].scale = MOTION_SENSE_DEFAULT_SCALE;
   305	
   306			/* 0 is a correct value used to stop the device */
   307			if (state->msg->version < 3) {
   308				get_default_min_max_freq(state->resp->info.type,
   309							 &frequencies[1],
   310							 &frequencies[2],
   311							 &state->fifo_max_event_count);
   312			} else {
   313				if (state->resp->info_3.max_frequency == 0) {
   314					get_default_min_max_freq(state->resp->info.type,
   315								 &frequencies[1],
   316								 &frequencies[2],
   317								 &temp);
   318				} else {
   319					frequencies[1] = state->resp->info_3.min_frequency;
   320					frequencies[2] = state->resp->info_3.max_frequency;
   321				}
   322				state->fifo_max_event_count = state->resp->info_3.fifo_max_event_count;
   323			}
   324			for (i = 0; i < ARRAY_SIZE(frequencies); i++) {
   325				state->frequencies[2 * i] = frequencies[i] / 1000;
   326				state->frequencies[2 * i + 1] =
   327					(frequencies[i] % 1000) * 1000;
   328			}
   329	
   330			if (cros_ec_check_features(ec, EC_FEATURE_MOTION_SENSE_FIFO)) {
   331				/*
   332				 * Create a software buffer, feed by the EC FIFO.
   333				 * We can not use trigger here, as events are generated
   334				 * as soon as sample_frequency is set.
   335				 */
   336				ret = devm_iio_kfifo_buffer_setup_ext(dev, indio_dev,
   337								      INDIO_BUFFER_SOFTWARE, NULL,
   338								      cros_ec_sensor_fifo_attributes);
   339				if (ret)
   340					return ret;
   341	
   342				ret = cros_ec_sensorhub_register_push_data(
   343						sensor_hub, sensor_platform->sensor_num,
   344						indio_dev, push_data);
   345				if (ret)
   346					return ret;
   347	
   348				ret = devm_add_action_or_reset(
   349						dev, cros_ec_sensors_core_clean, pdev);
   350				if (ret)
   351					return ret;
   352	
   353				/* Timestamp coming from FIFO are in ns since boot. */
   354				ret = iio_device_set_clock(indio_dev, CLOCK_BOOTTIME);
   355				if (ret)
   356					return ret;
   357	
   358			} else {
   359				/*
   360				 * The only way to get samples in buffer is to set a
   361				 * software trigger (systrig, hrtimer).
   362				 */
   363				ret = devm_iio_triggered_buffer_setup_ext(dev,
   364						indio_dev, NULL, trigger_capture,
 > 365						IIO_BUFFER_DIRECTION_IN, NULL);
   366				if (ret)
   367					return ret;
   368			}
   369		}
   370	
   371		return 0;
   372	}
   373	EXPORT_SYMBOL_GPL(cros_ec_sensors_core_init);
   374	

---
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: 34338 bytes --]

  reply	other threads:[~2021-08-21  3:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 16:59 [PATCH v4 0/6] iio: Add output buffer support and DAC example Mihail Chindris
2021-08-20 16:59 ` [PATCH v4 1/6] iio: Add output buffer support Mihail Chindris
2021-08-21  0:24   ` kernel test robot
2021-08-23  2:23   ` kernel test robot
2021-08-23 13:50   ` Nuno Sá
2021-08-30 15:42     ` Jonathan Cameron
2021-09-01  8:50       ` Sa, Nuno
2021-09-05  9:54         ` Jonathan Cameron
2021-08-25  8:35   ` Alexandru Ardelean
2021-08-30 16:05   ` Jonathan Cameron
2021-09-01  8:54     ` Sa, Nuno
2021-09-05  9:55       ` Jonathan Cameron
2021-09-16 10:57     ` Chindris, Mihail
2021-08-20 16:59 ` [PATCH v4 2/6] iio: kfifo-buffer: " Mihail Chindris
2021-08-21 14:15   ` kernel test robot
2021-08-23 13:51   ` Nuno Sá
2021-08-20 16:59 ` [PATCH v4 3/6] iio: triggered-buffer: extend support to configure output buffers Mihail Chindris
2021-08-21  3:28   ` kernel test robot [this message]
2021-08-20 16:59 ` [PATCH v4 4/6] Documentation:ABI:testing:add doc for AD3552R ABI Mihail Chindris
2021-08-30 15:22   ` Jonathan Cameron
2021-08-20 16:59 ` [PATCH v4 5/6] dt-bindings: iio: dac: Add adi,ad3552r.yaml Mihail Chindris
2021-08-30 15:37   ` Jonathan Cameron
2021-08-20 16:59 ` [PATCH v4 6/6] drivers:iio:dac: Add AD3552R driver support Mihail Chindris
2021-08-20 19:55   ` kernel test robot
2021-08-20 22:15   ` kernel test robot
2021-08-23 14:01   ` Nuno Sá
2021-08-30 16:54   ` Jonathan Cameron
2021-08-25  7:35 ` [PATCH v4 0/6] iio: Add output buffer support and DAC example Alexandru Ardelean
2021-08-30 15:17   ` 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=202108211108.gg3rDN7b-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dragos.bogdan@analog.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mihail.chindris@analog.com \
    --cc=nuno.sa@analog.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).