:::::: :::::: Manual check reason: "low confidence bisect report" :::::: Manual check reason: "low confidence static check warning: drivers/staging/media/tegra-video/vip.c:120:22: warning: use of uninitialized value '' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]" :::::: BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev In-Reply-To: <20221109141852.729246-23-luca.ceresoli@bootlin.com> References: <20221109141852.729246-23-luca.ceresoli@bootlin.com> TO: luca.ceresoli@bootlin.com TO: David Airlie TO: Daniel Vetter TO: Rob Herring TO: Krzysztof Kozlowski TO: Thierry Reding TO: Jonathan Hunter TO: Sowjanya Komatineni TO: Mauro Carvalho Chehab CC: linux-media@vger.kernel.org TO: "Greg Kroah-Hartman" TO: Hans Verkuil TO: Dmitry Osipenko CC: Luca Ceresoli CC: linux-tegra@vger.kernel.org CC: dri-devel@lists.freedesktop.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-staging@lists.linux.dev CC: Thomas Petazzoni CC: Richard Leitner Hi, I love your patch! Perhaps something to improve: [auto build test WARNING on tegra/for-next] [also build test WARNING on robh/for-next drm/drm-next linus/master v6.1-rc5 next-20221116] [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/luca-ceresoli-bootlin-com/Add-Tegra20-parallel-video-input-capture/20221109-222345 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next patch link: https://lore.kernel.org/r/20221109141852.729246-23-luca.ceresoli%40bootlin.com patch subject: [PATCH 22/23] staging: media: tegra-video: add support for VIP (parallel video input) :::::: branch date: 9 days ago :::::: commit date: 9 days ago config: arm-randconfig-c002-20221115 compiler: arm-linux-gnueabi-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/0911a9efc04785fd3885ca044968098e743e1eaf git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review luca-ceresoli-bootlin-com/Add-Tegra20-parallel-video-input-capture/20221109-222345 git checkout 0911a9efc04785fd3885ca044968098e743e1eaf # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot gcc_analyzer warnings: (new ones prefixed by >>) drivers/staging/media/tegra-video/vip.c: In function 'tegra_vip_channel_of_parse': >> drivers/staging/media/tegra-video/vip.c:120:22: warning: use of uninitialized value '' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 120 | unsigned int portno, num_pads; | ^~~~~~ 'tegra_vip_channel_of_parse': event 1 | | 120 | unsigned int portno, num_pads; | | ^~~~~~ | | | | | (1) use of uninitialized value '' here | vim +120 drivers/staging/media/tegra-video/vip.c 0911a9efc04785 Luca Ceresoli 2022-11-09 110 0911a9efc04785 Luca Ceresoli 2022-11-09 111 static int tegra_vip_channel_of_parse(struct tegra_vip *vip) 0911a9efc04785 Luca Ceresoli 2022-11-09 112 { 0911a9efc04785 Luca Ceresoli 2022-11-09 113 struct device *dev = vip->dev; 0911a9efc04785 Luca Ceresoli 2022-11-09 114 struct device_node *node; 0911a9efc04785 Luca Ceresoli 2022-11-09 115 struct v4l2_fwnode_endpoint v4l2_ep = { 0911a9efc04785 Luca Ceresoli 2022-11-09 116 .bus_type = V4L2_MBUS_PARALLEL 0911a9efc04785 Luca Ceresoli 2022-11-09 117 }; 0911a9efc04785 Luca Ceresoli 2022-11-09 118 struct fwnode_handle *fwh; 0911a9efc04785 Luca Ceresoli 2022-11-09 119 struct device_node *ep; 0911a9efc04785 Luca Ceresoli 2022-11-09 @120 unsigned int portno, num_pads; 0911a9efc04785 Luca Ceresoli 2022-11-09 121 int err; 0911a9efc04785 Luca Ceresoli 2022-11-09 122 0911a9efc04785 Luca Ceresoli 2022-11-09 123 node = of_get_child_by_name(dev->of_node, "channel"); 0911a9efc04785 Luca Ceresoli 2022-11-09 124 0911a9efc04785 Luca Ceresoli 2022-11-09 125 err = of_property_read_u32(node, "reg", &portno); 0911a9efc04785 Luca Ceresoli 2022-11-09 126 if (err < 0) { 0911a9efc04785 Luca Ceresoli 2022-11-09 127 dev_err_probe(dev, err, "%pOF: error reading reg property\n", node); 0911a9efc04785 Luca Ceresoli 2022-11-09 128 goto err_node_put; 0911a9efc04785 Luca Ceresoli 2022-11-09 129 } 0911a9efc04785 Luca Ceresoli 2022-11-09 130 0911a9efc04785 Luca Ceresoli 2022-11-09 131 if (portno != 0) { 0911a9efc04785 Luca Ceresoli 2022-11-09 132 err = -EINVAL; 0911a9efc04785 Luca Ceresoli 2022-11-09 133 dev_err_probe(dev, err, "%pOF: invalid reg property\n", node); 0911a9efc04785 Luca Ceresoli 2022-11-09 134 goto err_node_put; 0911a9efc04785 Luca Ceresoli 2022-11-09 135 } 0911a9efc04785 Luca Ceresoli 2022-11-09 136 0911a9efc04785 Luca Ceresoli 2022-11-09 137 ep = of_graph_get_endpoint_by_regs(node, 0, 0); 0911a9efc04785 Luca Ceresoli 2022-11-09 138 if (!ep) { 0911a9efc04785 Luca Ceresoli 2022-11-09 139 err = -EINVAL; 0911a9efc04785 Luca Ceresoli 2022-11-09 140 dev_err_probe(dev, err, "%pOF: error getting endpoint node\n", node); 0911a9efc04785 Luca Ceresoli 2022-11-09 141 goto err_node_put; 0911a9efc04785 Luca Ceresoli 2022-11-09 142 } 0911a9efc04785 Luca Ceresoli 2022-11-09 143 0911a9efc04785 Luca Ceresoli 2022-11-09 144 fwh = of_fwnode_handle(ep); 0911a9efc04785 Luca Ceresoli 2022-11-09 145 err = v4l2_fwnode_endpoint_parse(fwh, &v4l2_ep); 0911a9efc04785 Luca Ceresoli 2022-11-09 146 of_node_put(ep); 0911a9efc04785 Luca Ceresoli 2022-11-09 147 if (err) { 0911a9efc04785 Luca Ceresoli 2022-11-09 148 dev_err_probe(dev, err, "%pOF: failed to parse v4l2 endpoint\n", node); 0911a9efc04785 Luca Ceresoli 2022-11-09 149 goto err_node_put; 0911a9efc04785 Luca Ceresoli 2022-11-09 150 } 0911a9efc04785 Luca Ceresoli 2022-11-09 151 0911a9efc04785 Luca Ceresoli 2022-11-09 152 num_pads = of_graph_get_endpoint_count(node); 0911a9efc04785 Luca Ceresoli 2022-11-09 153 if (num_pads != TEGRA_VIP_PADS_NUM) { 0911a9efc04785 Luca Ceresoli 2022-11-09 154 err = -EINVAL; 0911a9efc04785 Luca Ceresoli 2022-11-09 155 dev_err_probe(dev, err, "%pOF: need 2 pads, got %d\n", node, num_pads); 0911a9efc04785 Luca Ceresoli 2022-11-09 156 goto err_node_put; 0911a9efc04785 Luca Ceresoli 2022-11-09 157 } 0911a9efc04785 Luca Ceresoli 2022-11-09 158 0911a9efc04785 Luca Ceresoli 2022-11-09 159 vip->chan.of_node = of_node_get(node); 0911a9efc04785 Luca Ceresoli 2022-11-09 160 vip->chan.pads[TEGRA_VIP_PAD_SINK].flags = MEDIA_PAD_FL_SINK; 0911a9efc04785 Luca Ceresoli 2022-11-09 161 vip->chan.pads[TEGRA_VIP_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE; 0911a9efc04785 Luca Ceresoli 2022-11-09 162 0911a9efc04785 Luca Ceresoli 2022-11-09 163 return 0; 0911a9efc04785 Luca Ceresoli 2022-11-09 164 0911a9efc04785 Luca Ceresoli 2022-11-09 165 err_node_put: 0911a9efc04785 Luca Ceresoli 2022-11-09 166 of_node_put(node); 0911a9efc04785 Luca Ceresoli 2022-11-09 167 return err; 0911a9efc04785 Luca Ceresoli 2022-11-09 168 } 0911a9efc04785 Luca Ceresoli 2022-11-09 169 -- 0-DAY CI Kernel Test Service https://01.org/lkp