lkml.org 
[lkml]   [2020]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 5/5] soc: imx8: Add the SC SECVIO driver
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.10-rc3]
[cannot apply to shawnguo/for-next linux/master next-20201110]
[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]

url: https://github.com/0day-ci/linux/commits/franck-lenormand-oss-nxp-com/Add-support-of-SECVIO-from-SNVS-on-iMX8q-x/20201110-221415
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: mips-allyesconfig (attached as .config)
compiler: mips-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
# https://github.com/0day-ci/linux/commit/5ccece0fd2b2063f4983ad0bd211ac5d1dfe8f0f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review franck-lenormand-oss-nxp-com/Add-support-of-SECVIO-from-SNVS-on-iMX8q-x/20201110-221415
git checkout 5ccece0fd2b2063f4983ad0bd211ac5d1dfe8f0f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

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

All warnings (new ones prefixed by >>):

drivers/soc/imx/secvio/imx-secvio-sc.c: In function 'int_imx_secvio_sc_disable_irq':
>> drivers/soc/imx/secvio/imx-secvio-sc.c:509:29: warning: variable 'data' set but not used [-Wunused-but-set-variable]
509 | struct imx_secvio_sc_data *data;
| ^~~~
drivers/soc/imx/secvio/imx-secvio-sc.c: At top level:
>> drivers/soc/imx/secvio/imx-secvio-sc.c:615:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
615 | const static struct file_operations imx_secvio_sc_fops = {
| ^~~~~
--
>> drivers/soc/imx/secvio/imx-secvio-audit.c:23:5: warning: no previous prototype for 'report_to_audit_notify' [-Wmissing-prototypes]
23 | int report_to_audit_notify(struct notifier_block *nb, unsigned long status,
| ^~~~~~~~~~~~~~~~~~~~~~

vim +/data +509 drivers/soc/imx/secvio/imx-secvio-sc.c

496
497 /**
498 * int_imx_secvio_sc_disable_irq() - Disable secvio IRQ
499 *
500 * @dev: secvio device
501 *
502 * Return:
503 * 0 - OK
504 * < 0 - error.
505 */
506 static int int_imx_secvio_sc_disable_irq(struct device *dev)
507 {
508 int ret = 0;
> 509 struct imx_secvio_sc_data *data;
510
511 data = dev_get_drvdata(dev);
512
513 /* Disable the IRQ */
514 ret = imx_scu_irq_group_enable(IMX_SC_IRQ_GROUP_WAKE, IMX_SC_IRQ_SECVIO,
515 false);
516 if (ret) {
517 dev_err(dev, "Cannot disable SCU IRQ: %d\n", ret);
518 return ret;
519 }
520
521 return 0;
522 }
523
524 /**
525 * if_imx_secvio_sc_disable_irq() - Wrapper for int_imx_secvio_sc_disable_irq
526 *
527 * Can be used with devm
528 *
529 * @dev: secvio device
530 */
531 static void if_imx_secvio_sc_disable_irq(void *dev)
532 {
533 int_imx_secvio_sc_disable_irq(dev);
534 }
535
536 /**
537 * imx_secvio_sc_open() - Store node info for ioctl
538 *
539 * @node: inode
540 * @file: file used to perform the ioctl
541 *
542 * Return:
543 * 0 - OK
544 * < 0 - error.
545 */
546 static int imx_secvio_sc_open(struct inode *node, struct file *filp)
547 {
548 filp->private_data = node->i_private;
549
550 return 0;
551 }
552
553 /**
554 * imx_secvio_sc_ioctl() - IOCTL handler for the driver
555 *
556 * @file: file used to perform the ioctl
557 * @cmd: command to perform
558 * @arg: Pointer on structure with info for the command
559 *
560 * Return:
561 * 0 - OK
562 * < 0 - error.
563 */
564 static long imx_secvio_sc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
565 {
566 struct device *dev = file->private_data;
567 struct secvio_sc_notifier_info info;
568 int ret;
569
570 switch (cmd) {
571 case IMX_SECVIO_SC_GET_STATE:
572 ret = int_imx_secvio_sc_get_state(dev, &info);
573 if (ret) {
574 dev_err(dev, "Fail to get state\n");
575 goto exit;
576 }
577
578 ret = copy_to_user((void *)arg, &info, sizeof(info));
579 if (ret) {
580 dev_err(dev, "Fail to copy info to user\n");
581 ret = -EFAULT;
582 goto exit;
583 }
584 break;
585 case IMX_SECVIO_SC_CHECK_STATE:
586 ret = int_imx_secvio_sc_check_state(dev);
587 if (ret) {
588 dev_err(dev, "Fail to check state\n");
589 goto exit;
590 }
591 break;
592 case IMX_SECVIO_SC_CLEAR_STATE:
593 ret = copy_from_user(&info, (void *)arg, sizeof(info));
594 if (ret) {
595 dev_err(dev, "Fail to copy info from user\n");
596 ret = -EFAULT;
597 goto exit;
598 }
599
600 ret = int_imx_secvio_sc_clear_state(dev, info.hpsvs, info.lps,
601 info.lptds);
602 if (ret) {
603 dev_err(dev, "Fail to clear state\n");
604 goto exit;
605 }
606 break;
607 default:
608 ret = -ENOIOCTLCMD;
609 }
610
611 exit:
612 return ret;
613 }
614
> 615 const static struct file_operations imx_secvio_sc_fops = {
616 .owner = THIS_MODULE,
617 .open = imx_secvio_sc_open,
618 .unlocked_ioctl = imx_secvio_sc_ioctl,
619 };
620

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-11-11 02:09    [W:0.094 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site