mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: franck.lenormand@oss.nxp.com, shawnguo@kernel.org,
	s.hauer@pengutronix.de, festevam@gmail.com
Cc: kbuild-all@lists.01.org, franck.lenormand@oss.nxp.com,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
	aisheng.dong@nxp.com, abel.vesa@nxp.com
Subject: Re: [PATCH V3 5/5] soc: imx8: Add the SC SECVIO driver
Date: Wed, 11 Nov 2020 09:08:26 +0800	[thread overview]
Message-ID: <202011110934.PqdAnTcC-lkp@intel.com> (raw)
In-Reply-To: <1605017534-87305-6-git-send-email-franck.lenormand@oss.nxp.com>

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

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69014 bytes --]

      reply	other threads:[~2020-11-11  1:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 14:12 [PATCH v3 0/5] Add support of SECVIO from SNVS on iMX8q/x franck.lenormand
2020-11-10 14:12 ` [PATCH V3 1/5] firmware: imx: scu-seco: Add Secure Controller APIS franck.lenormand
2020-11-11 11:34   ` Daniel Baluta
2020-11-10 14:12 ` [PATCH V3 2/5] firmware: imx: scu-irq: Add API to retrieve status of IRQ franck.lenormand
2020-11-10 14:12 ` [PATCH V3 3/5] dt-bindings: firmware: imx-scu: Add SECVIO resource franck.lenormand
2020-11-10 14:12 ` [PATCH V3 4/5] dt-bindings: arm: imx: Documentation of the SC secvio driver franck.lenormand
2020-11-10 14:12 ` [PATCH V3 5/5] soc: imx8: Add the SC SECVIO driver franck.lenormand
2020-11-11  1:08   ` kernel test robot [this message]

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=202011110934.PqdAnTcC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=abel.vesa@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=franck.lenormand@oss.nxp.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®