From: kernel test robot <lkp@intel.com>
To: Volodymyr Kharuk <vkh@melexis.com>, linux-media@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Volodymyr Kharuk <vkh@melexis.com>,
Andrii Kyselov <ays@melexis.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Hyun Kwon <hyun.kwon@xilinx.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Michal Simek <monstr@monstr.eu>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 6/6] media: i2c: Add driver for mlx7502x ToF sensor
Date: Mon, 18 Jul 2022 14:20:45 +0800 [thread overview]
Message-ID: <202207181432.DwoL0GPb-lkp@intel.com> (raw)
In-Reply-To: <6f9b20bb1946d8a50170963b84e32abfdee14ba7.1657786765.git.vkh@melexis.com>
Hi Volodymyr,
I love your patch! Perhaps something to improve:
[auto build test WARNING on d8e8aa866ed8636fd6c1017c3d9453eab2922496]
url: https://github.com/intel-lab-lkp/linux/commits/Volodymyr-Kharuk/media-i2c-mlx7502x-ToF-camera-support/20220714-163709
base: d8e8aa866ed8636fd6c1017c3d9453eab2922496
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220718/202207181432.DwoL0GPb-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 07022e6cf9b5b3baa642be53d0b3c3f1c403dbfd)
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/59a691c2f449518699a328ea663098aa3ae038b9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Volodymyr-Kharuk/media-i2c-mlx7502x-ToF-camera-support/20220714-163709
git checkout 59a691c2f449518699a328ea663098aa3ae038b9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/media/i2c/ drivers/net/pcs/ kernel/trace/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/mlx7502x.c:981:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (!on && sensor->streaming) {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/mlx7502x.c:993:9: note: uninitialized use occurs here
return ret;
^~~
drivers/media/i2c/mlx7502x.c:981:9: note: remove the 'if' if its condition is always true
} else if (!on && sensor->streaming) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/mlx7502x.c:981:13: warning: variable 'ret' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
} else if (!on && sensor->streaming) {
^~~
drivers/media/i2c/mlx7502x.c:993:9: note: uninitialized use occurs here
return ret;
^~~
drivers/media/i2c/mlx7502x.c:981:13: note: remove the '&&' if its condition is always true
} else if (!on && sensor->streaming) {
^~~~~~
drivers/media/i2c/mlx7502x.c:945:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
2 warnings generated.
vim +981 drivers/media/i2c/mlx7502x.c
941
942 static int mlx7502x_s_stream(struct v4l2_subdev *sd, int on)
943 {
944 struct mlx7502x *sensor = to_mlx7502x(sd);
945 int ret;
946
947 mutex_lock(&sensor->lock);
948
949 if (on && !sensor->streaming) {
950 ret = pm_runtime_resume_and_get(sensor->dev);
951 if (ret < 0) {
952 mutex_unlock(&sensor->lock);
953 return ret;
954 }
955
956 ret = __v4l2_ctrl_handler_setup(sd->ctrl_handler);
957 if (ret < 0)
958 goto error_stream;
959 /* the registers below depends on hmax, which is configured in controls */
960 ret = mlx7502x_set_link_freq(sensor);
961 if (ret < 0)
962 goto error_stream;
963 ret = mlx7502x_update_output_format(sensor);
964 if (ret < 0)
965 goto error_stream;
966 ret = mlx7502x_set_trigger_mode(sensor);
967 if (ret < 0)
968 goto error_stream;
969
970 ret = mlx7502x_write8(sd, MLX7502X_STREAM_EN_REG, 1u);
971 if (ret < 0)
972 goto error_stream;
973
974 sensor->streaming = 1u;
975 dev_dbg(sensor->dev, "stream enabled\n");
976
977 /* we need to wait to stabilize the system after streaming on */
978 usleep_range(MLX7502X_STREAMING_DELAY_US, MLX7502X_STREAMING_DELAY_US + 10);
979
980 gpiod_set_value_cansleep(sensor->leden, 1);
> 981 } else if (!on && sensor->streaming) {
982 gpiod_set_value_cansleep(sensor->leden, 0);
983
984 sensor->streaming = 0u;
985 ret = mlx7502x_write8(sd, MLX7502X_STREAM_EN_REG, 0u);
986 dev_dbg(sensor->dev, "stream disabled\n");
987
988 pm_runtime_mark_last_busy(sensor->dev);
989 pm_runtime_put_autosuspend(sensor->dev);
990 }
991
992 mutex_unlock(&sensor->lock);
993 return ret;
994
995 error_stream:
996 pm_runtime_put(sensor->dev);
997 mutex_unlock(&sensor->lock);
998 return ret;
999 }
1000
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-07-18 6:21 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 8:34 [PATCH v2 0/6] media: i2c: mlx7502x ToF camera support Volodymyr Kharuk
2022-07-14 8:34 ` [PATCH v2 1/6] media: xilinx: csi2rxss: Add 1X12 greyscale format Volodymyr Kharuk
2022-07-14 10:32 ` Laurent Pinchart
2022-07-14 8:34 ` [PATCH v2 2/6] media: xilinx: video: " Volodymyr Kharuk
2022-07-14 10:36 ` Laurent Pinchart
2022-07-14 8:34 ` [PATCH v2 3/6] media: v4l: ctrls: Add user control base for mlx7502x Volodymyr Kharuk
2022-07-14 8:34 ` [PATCH v2 4/6] media: uapi: Add mlx7502x header file Volodymyr Kharuk
2022-07-14 10:31 ` Laurent Pinchart
2022-07-15 8:57 ` Volodymyr Kharuk
2022-07-15 9:36 ` Laurent Pinchart
2022-07-15 15:03 ` Volodymyr Kharuk
2022-07-19 15:20 ` Benjamin Mugnier
2022-07-19 15:31 ` Dave Stevenson
2022-07-20 14:44 ` Volodymyr Kharuk
2022-07-21 9:58 ` Benjamin Mugnier
2022-07-14 8:34 ` [PATCH v2 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding Volodymyr Kharuk
2022-07-14 8:41 ` Krzysztof Kozlowski
2022-07-14 10:06 ` Laurent Pinchart
2022-07-14 10:35 ` Krzysztof Kozlowski
2022-07-14 10:45 ` Laurent Pinchart
2022-07-14 11:00 ` Krzysztof Kozlowski
2022-07-14 11:11 ` Krzysztof Kozlowski
2022-07-14 11:12 ` Laurent Pinchart
2022-07-14 11:23 ` Krzysztof Kozlowski
2022-07-14 11:29 ` Laurent Pinchart
2022-07-14 11:56 ` Krzysztof Kozlowski
2022-07-20 14:54 ` Volodymyr Kharuk
2023-02-06 10:45 ` Laurent Pinchart
2023-02-06 18:20 ` Krzysztof Kozlowski
2023-02-06 18:35 ` Laurent Pinchart
2022-07-15 15:32 ` Volodymyr Kharuk
2023-02-06 10:36 ` Laurent Pinchart
2022-07-14 8:34 ` [PATCH v2 6/6] media: i2c: Add driver for mlx7502x ToF sensor Volodymyr Kharuk
2022-07-17 1:33 ` kernel test robot
2022-07-17 23:52 ` kernel test robot
2022-07-18 6:20 ` kernel test robot [this message]
2022-07-19 8:16 ` kernel test robot
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=202207181432.DwoL0GPb-lkp@intel.com \
--to=lkp@intel.com \
--cc=ays@melexis.com \
--cc=devicetree@vger.kernel.org \
--cc=hyun.kwon@xilinx.com \
--cc=kbuild-all@lists.01.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=krzk@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=monstr@monstr.eu \
--cc=robh+dt@kernel.org \
--cc=vkh@melexis.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 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.