From: kernel test robot <lkp@intel.com>
To: Ben Levinsky <ben.levinsky@xilinx.com>,
stefanos@xilinx.com, michals@xilinx.com, michael.auchter@ni.com
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
devicetree@vger.kernel.org, mathieu.poirier@linaro.org,
emooring@xilinx.com, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v16 5/5] remoteproc: Add initial zynqmp R5 remoteproc driver
Date: Thu, 1 Oct 2020 19:32:32 +0800 [thread overview]
Message-ID: <202010011932.ZuYqrN0I-lkp@intel.com> (raw)
In-Reply-To: <20200922223930.4710-6-ben.levinsky@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 5619 bytes --]
Hi Ben,
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.9-rc7 next-20200930]
[cannot apply to xlnx/master linux/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]
url: https://github.com/0day-ci/linux/commits/Ben-Levinsky/Provide-basic-driver-to-control-Arm-R5-co-processor-found-on-Xilinx-ZynqMP/20200923-064055
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-randconfig-r005-20200930 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/d3c4821ffb9b295e80f07fd712322efa657a95d9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ben-Levinsky/Provide-basic-driver-to-control-Arm-R5-co-processor-found-on-Xilinx-ZynqMP/20200923-064055
git checkout d3c4821ffb9b295e80f07fd712322efa657a95d9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/remoteproc/zynqmp_r5_remoteproc.c:630:2: warning: variable 'dev' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!pdata) {
^~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/remoteproc/zynqmp_r5_remoteproc.c:686:20: note: uninitialized use occurs here
device_unregister(dev);
^~~
drivers/remoteproc/zynqmp_r5_remoteproc.c:630:2: note: remove the 'if' if its condition is always false
if (!pdata) {
^~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/remoteproc/zynqmp_r5_remoteproc.c:625:20: note: initialize the variable 'dev' to silence this warning
struct device *dev;
^
= NULL
1 warning generated.
vim +630 drivers/remoteproc/zynqmp_r5_remoteproc.c
610
611 /**
612 * zynqmp_r5_probe() - Probes ZynqMP R5 processor device node
613 * @pdata: pointer to the ZynqMP R5 processor platform data
614 * @pdev: parent RPU domain platform device
615 * @node: pointer of the device node
616 *
617 * Function to retrieve the information of the ZynqMP R5 device node.
618 *
619 * Return: 0 for success, negative value for failure.
620 */
621 static int zynqmp_r5_probe(struct zynqmp_r5_pdata *pdata,
622 struct platform_device *pdev,
623 struct device_node *node)
624 {
625 struct device *dev;
626 struct rproc *rproc;
627 int ret;
628
629 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
> 630 if (!pdata) {
631 ret = -ENOMEM;
632 goto error;
633 }
634 dev = &pdata->dev;
635
636 /* Create device for ZynqMP R5 device */
637 dev->parent = &pdev->dev;
638 dev->release = zynqmp_r5_release;
639 dev->of_node = node;
640 dev_set_name(dev, "%pOF", node);
641 dev_set_drvdata(dev, pdata);
642 ret = device_register(dev);
643 if (ret)
644 goto error;
645
646 /* Allocate remoteproc instance */
647 rproc = rproc_alloc(dev, dev_name(dev), &zynqmp_r5_rproc_ops, NULL, sizeof(*pdata));
648 if (!rproc) {
649 ret = -ENOMEM;
650 goto error;
651 }
652 pdata->rproc = rproc;
653 rproc->priv = pdata;
654
655 /* Set up DMA mask */
656 ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
657 if (ret)
658 goto error;
659
660 /* Get R5 power domain node */
661 ret = of_property_read_u32(node, "pnode-id", &pdata->pnode_id);
662 if (ret)
663 goto error;
664
665 ret = r5_set_mode(pdata);
666 if (ret)
667 goto error;
668
669 if (of_property_read_bool(node, "mboxes")) {
670 ret = zynqmp_r5_setup_mbox(pdata, node);
671 if (ret)
672 goto error;
673 }
674
675 /* Add R5 remoteproc */
676 ret = rproc_add(rproc);
677 if (ret)
678 goto error;
679
680 platform_set_drvdata(pdev, rproc);
681 return 0;
682 error:
683 if (pdata->rproc)
684 rproc_free(pdata->rproc);
685 pdata->rproc = NULL;
686 device_unregister(dev);
687 return ret;
688 }
689
---
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: 41700 bytes --]
prev parent reply other threads:[~2020-10-01 11:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 22:39 [PATCH v16 0/5] Provide basic driver to control Arm R5 co-processor found on Xilinx ZynqMP Ben Levinsky
2020-09-22 22:39 ` [PATCH v16 1/5] firmware: xilinx: Add ZynqMP firmware ioctl enums for RPU configuration Ben Levinsky
2020-09-22 22:39 ` [PATCH v16 2/5] firmware: xilinx: Add shutdown/wakeup APIs Ben Levinsky
2020-09-22 22:39 ` [PATCH v16 3/5] firmware: xilinx: Add RPU configuration APIs Ben Levinsky
2020-09-22 22:39 ` [PATCH v16 4/5] dt-bindings: remoteproc: Add documentation for ZynqMP R5 rproc bindings Ben Levinsky
2020-09-29 18:36 ` Rob Herring
2020-09-30 16:21 ` Ben Levinsky
2020-11-05 19:42 ` Rob Herring
2020-09-30 22:40 ` Stefano Stabellini
2020-09-22 22:39 ` [PATCH v16 5/5] remoteproc: Add initial zynqmp R5 remoteproc driver Ben Levinsky
2020-10-01 11:32 ` 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=202010011932.ZuYqrN0I-lkp@intel.com \
--to=lkp@intel.com \
--cc=ben.levinsky@xilinx.com \
--cc=clang-built-linux@googlegroups.com \
--cc=devicetree@vger.kernel.org \
--cc=emooring@xilinx.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=michael.auchter@ni.com \
--cc=michals@xilinx.com \
--cc=robh+dt@kernel.org \
--cc=stefanos@xilinx.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).