From: kernel test robot <lkp@intel.com>
To: Pankaj Gupta <pankaj.gupta@nxp.com>,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, gaurav.jain@nxp.com,
sahil.malhotra@nxp.com, aisheng.dong@nxp.com, V.Sethi@nxp.com
Cc: oe-kbuild-all@lists.linux.dev, Pankaj Gupta <pankaj.gupta@nxp.com>
Subject: Re: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support
Date: Wed, 12 Apr 2023 01:31:49 +0800 [thread overview]
Message-ID: <202304120141.95PmXzH6-lkp@intel.com> (raw)
In-Reply-To: <20230411162536.30604-7-pankaj.gupta@nxp.com>
Hi Pankaj,
kernel test robot noticed the following build warnings:
[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on robh/for-next arm/for-next arm/fixes arm64/for-next/core clk/clk-next kvmarm/next rockchip/for-next soc/for-next linus/master v6.3-rc6 next-20230411]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913
base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
patch link: https://lore.kernel.org/r/20230411162536.30604-7-pankaj.gupta%40nxp.com
patch subject: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230412/202304120141.95PmXzH6-lkp@intel.com/config)
compiler: ia64-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/intel-lab-lkp/linux/commit/80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913
git checkout 80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
# 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=ia64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/firmware/imx/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304120141.95PmXzH6-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/firmware/imx/ele_mu.c: In function 'ele_mu_fops_read':
>> drivers/firmware/imx/ele_mu.c:408:23: warning: variable 'header' set but not used [-Wunused-but-set-variable]
408 | struct mu_hdr header;
| ^~~~~~
drivers/firmware/imx/ele_mu.c:404:29: warning: unused variable 'ele_mu_priv' [-Wunused-variable]
404 | struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
| ^~~~~~~~~~~
vim +/header +408 drivers/firmware/imx/ele_mu.c
392
393 /*
394 * Read a message from the MU.
395 * Blocking until a message is available.
396 */
397 static ssize_t ele_mu_fops_read(struct file *fp, char __user *buf,
398 size_t size, loff_t *ppos)
399 {
400 struct ele_mu_device_ctx *dev_ctx
401 = container_of(fp->private_data,
402 struct ele_mu_device_ctx,
403 miscdev);
404 struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
405 u32 data_size = 0, size_to_copy = 0;
406 struct ele_obuf_desc *b_desc;
407 int err;
> 408 struct mu_hdr header;
409
410 devctx_dbg(dev_ctx, "read to buf %p(%ld), ppos=%lld\n", buf, size,
411 ((ppos) ? *ppos : 0));
412
413 if (down_interruptible(&dev_ctx->fops_lock))
414 return -EBUSY;
415
416 if (dev_ctx->status != MU_OPENED) {
417 err = -EINVAL;
418 goto exit;
419 }
420
421 /* Wait until the complete message is received on the MU. */
422 err = wait_event_interruptible(dev_ctx->wq, dev_ctx->pending_hdr != 0);
423 if (err) {
424 devctx_err(dev_ctx, "Err[0x%x]:Interrupted by signal.\n", err);
425 goto exit;
426 }
427
428 devctx_dbg(dev_ctx, "%s %s\n", __func__,
429 "message received, start transmit to user");
430
431 /* Check that the size passed as argument is larger than
432 * the one carried in the message.
433 */
434 data_size = dev_ctx->temp_resp_size * sizeof(u32);
435 size_to_copy = data_size;
436 if (size_to_copy > size) {
437 devctx_dbg(dev_ctx, "User buffer too small (%ld < %d)\n",
438 size, size_to_copy);
439 size_to_copy = size;
440 }
441
442 /* We may need to copy the output data to user before
443 * delivering the completion message.
444 */
445 while (!list_empty(&dev_ctx->pending_out)) {
446 b_desc = list_first_entry_or_null(&dev_ctx->pending_out,
447 struct ele_obuf_desc,
448 link);
449 if (b_desc->out_usr_ptr && b_desc->out_ptr) {
450 devctx_dbg(dev_ctx, "Copy output data to user\n");
451 err = (int)copy_to_user(b_desc->out_usr_ptr,
452 b_desc->out_ptr,
453 b_desc->out_size);
454 if (err) {
455 devctx_err(dev_ctx,
456 "Failure copying output data to user.");
457 err = -EFAULT;
458 goto exit;
459 }
460 }
461 __list_del_entry(&b_desc->link);
462 devm_kfree(dev_ctx->dev, b_desc);
463 }
464
465 header = *((struct mu_hdr *) (&dev_ctx->temp_resp[0]));
466
467 /* Copy data from the buffer */
468 print_hex_dump_debug("to user ", DUMP_PREFIX_OFFSET, 4, 4,
469 dev_ctx->temp_resp, size_to_copy, false);
470 err = (int)copy_to_user(buf, dev_ctx->temp_resp, size_to_copy);
471 if (err) {
472 devctx_err(dev_ctx, "Failed to copy to user\n");
473 err = -EFAULT;
474 goto exit;
475 }
476
477 err = size_to_copy;
478
479 /* free memory allocated on the shared buffers. */
480 dev_ctx->secure_mem.pos = 0;
481 dev_ctx->non_secure_mem.pos = 0;
482
483 dev_ctx->pending_hdr = 0;
484
485 exit:
486
487 up(&dev_ctx->fops_lock);
488 return err;
489 }
490
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Pankaj Gupta <pankaj.gupta@nxp.com>,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, gaurav.jain@nxp.com,
sahil.malhotra@nxp.com, aisheng.dong@nxp.com, V.Sethi@nxp.com
Cc: oe-kbuild-all@lists.linux.dev, Pankaj Gupta <pankaj.gupta@nxp.com>
Subject: Re: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support
Date: Wed, 12 Apr 2023 01:31:49 +0800 [thread overview]
Message-ID: <202304120141.95PmXzH6-lkp@intel.com> (raw)
In-Reply-To: <20230411162536.30604-7-pankaj.gupta@nxp.com>
Hi Pankaj,
kernel test robot noticed the following build warnings:
[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on robh/for-next arm/for-next arm/fixes arm64/for-next/core clk/clk-next kvmarm/next rockchip/for-next soc/for-next linus/master v6.3-rc6 next-20230411]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913
base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
patch link: https://lore.kernel.org/r/20230411162536.30604-7-pankaj.gupta%40nxp.com
patch subject: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230412/202304120141.95PmXzH6-lkp@intel.com/config)
compiler: ia64-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/intel-lab-lkp/linux/commit/80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913
git checkout 80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
# 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=ia64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/firmware/imx/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304120141.95PmXzH6-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/firmware/imx/ele_mu.c: In function 'ele_mu_fops_read':
>> drivers/firmware/imx/ele_mu.c:408:23: warning: variable 'header' set but not used [-Wunused-but-set-variable]
408 | struct mu_hdr header;
| ^~~~~~
drivers/firmware/imx/ele_mu.c:404:29: warning: unused variable 'ele_mu_priv' [-Wunused-variable]
404 | struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
| ^~~~~~~~~~~
vim +/header +408 drivers/firmware/imx/ele_mu.c
392
393 /*
394 * Read a message from the MU.
395 * Blocking until a message is available.
396 */
397 static ssize_t ele_mu_fops_read(struct file *fp, char __user *buf,
398 size_t size, loff_t *ppos)
399 {
400 struct ele_mu_device_ctx *dev_ctx
401 = container_of(fp->private_data,
402 struct ele_mu_device_ctx,
403 miscdev);
404 struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
405 u32 data_size = 0, size_to_copy = 0;
406 struct ele_obuf_desc *b_desc;
407 int err;
> 408 struct mu_hdr header;
409
410 devctx_dbg(dev_ctx, "read to buf %p(%ld), ppos=%lld\n", buf, size,
411 ((ppos) ? *ppos : 0));
412
413 if (down_interruptible(&dev_ctx->fops_lock))
414 return -EBUSY;
415
416 if (dev_ctx->status != MU_OPENED) {
417 err = -EINVAL;
418 goto exit;
419 }
420
421 /* Wait until the complete message is received on the MU. */
422 err = wait_event_interruptible(dev_ctx->wq, dev_ctx->pending_hdr != 0);
423 if (err) {
424 devctx_err(dev_ctx, "Err[0x%x]:Interrupted by signal.\n", err);
425 goto exit;
426 }
427
428 devctx_dbg(dev_ctx, "%s %s\n", __func__,
429 "message received, start transmit to user");
430
431 /* Check that the size passed as argument is larger than
432 * the one carried in the message.
433 */
434 data_size = dev_ctx->temp_resp_size * sizeof(u32);
435 size_to_copy = data_size;
436 if (size_to_copy > size) {
437 devctx_dbg(dev_ctx, "User buffer too small (%ld < %d)\n",
438 size, size_to_copy);
439 size_to_copy = size;
440 }
441
442 /* We may need to copy the output data to user before
443 * delivering the completion message.
444 */
445 while (!list_empty(&dev_ctx->pending_out)) {
446 b_desc = list_first_entry_or_null(&dev_ctx->pending_out,
447 struct ele_obuf_desc,
448 link);
449 if (b_desc->out_usr_ptr && b_desc->out_ptr) {
450 devctx_dbg(dev_ctx, "Copy output data to user\n");
451 err = (int)copy_to_user(b_desc->out_usr_ptr,
452 b_desc->out_ptr,
453 b_desc->out_size);
454 if (err) {
455 devctx_err(dev_ctx,
456 "Failure copying output data to user.");
457 err = -EFAULT;
458 goto exit;
459 }
460 }
461 __list_del_entry(&b_desc->link);
462 devm_kfree(dev_ctx->dev, b_desc);
463 }
464
465 header = *((struct mu_hdr *) (&dev_ctx->temp_resp[0]));
466
467 /* Copy data from the buffer */
468 print_hex_dump_debug("to user ", DUMP_PREFIX_OFFSET, 4, 4,
469 dev_ctx->temp_resp, size_to_copy, false);
470 err = (int)copy_to_user(buf, dev_ctx->temp_resp, size_to_copy);
471 if (err) {
472 devctx_err(dev_ctx, "Failed to copy to user\n");
473 err = -EFAULT;
474 goto exit;
475 }
476
477 err = size_to_copy;
478
479 /* free memory allocated on the shared buffers. */
480 dev_ctx->secure_mem.pos = 0;
481 dev_ctx->non_secure_mem.pos = 0;
482
483 dev_ctx->pending_hdr = 0;
484
485 exit:
486
487 up(&dev_ctx->fops_lock);
488 return err;
489 }
490
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-04-11 17:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 16:25 [NXP ELE-MUAP Driver 0/7] *** firmware: imx: NXP Edgelock Enclave MUAP Driver *** Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 1/7] doc: device tree binding addition for ele MU Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-12 8:00 ` Peng Fan
2023-04-12 8:00 ` Peng Fan
2023-04-12 8:01 ` Krzysztof Kozlowski
2023-04-12 8:01 ` Krzysztof Kozlowski
2023-04-11 16:25 ` [NXP ELE-MUAP 2/7] arm64: dts: imx93-11x11-evk: added ele-mu Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 3/7] arm64: dts: imx93-11x11-evk: reserved mem-ranges to constrain ele-mu dma-range Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 4/7] arm64: dts: imx8ulp-evk: added ele-mu Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 5/7] arm64: dts: imx8ulp-evk: reserved mem-ranges to constrain ele-mu dma-range Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
2023-04-11 17:31 ` kernel test robot [this message]
2023-04-11 17:31 ` kernel test robot
2023-04-12 1:11 ` kernel test robot
2023-04-12 1:11 ` kernel test robot
2023-04-11 16:25 ` [NXP ELE-MUAP 7/7] MAINTAINERS: Added maintainer details Pankaj Gupta
2023-04-11 16:25 ` Pankaj Gupta
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=202304120141.95PmXzH6-lkp@intel.com \
--to=lkp@intel.com \
--cc=V.Sethi@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=festevam@gmail.com \
--cc=gaurav.jain@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pankaj.gupta@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sahil.malhotra@nxp.com \
--cc=shawnguo@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: link
Be 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.