From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
Herve Codina <herve.codina@bootlin.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Marek Vasut <marex@denx.de>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Herve Codina <herve.codina@bootlin.com>
Subject: Re: [PATCH 2/2] drm: bridge: ti-sn65dsi83: Add error recovery mechanism
Date: Mon, 28 Oct 2024 11:28:20 +0300 [thread overview]
Message-ID: <9a16ee73-cdc9-47bc-88f7-2fed5fdad2ff@stanley.mountain> (raw)
In-Reply-To: <20241024095539.1637280-3-herve.codina@bootlin.com>
Hi Herve,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Herve-Codina/dt-bindings-display-bridge-sn65dsi83-Add-interrupt/20241024-175758
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20241024095539.1637280-3-herve.codina%40bootlin.com
patch subject: [PATCH 2/2] drm: bridge: ti-sn65dsi83: Add error recovery mechanism
config: csky-randconfig-r073-20241026 (https://download.01.org/0day-ci/archive/20241026/202410262052.CRR7XezU-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202410262052.CRR7XezU-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/bridge/ti-sn65dsi83.c:360 sn65dsi83_reset_pipeline() error: uninitialized symbol 'state'.
vim +/state +360 drivers/gpu/drm/bridge/ti-sn65dsi83.c
caeb909b9ed830 Herve Codina 2024-10-24 330 static int sn65dsi83_reset_pipeline(struct sn65dsi83 *sn65dsi83)
caeb909b9ed830 Herve Codina 2024-10-24 331 {
caeb909b9ed830 Herve Codina 2024-10-24 332 struct drm_device *dev = sn65dsi83->bridge.dev;
caeb909b9ed830 Herve Codina 2024-10-24 333 struct drm_modeset_acquire_ctx ctx;
caeb909b9ed830 Herve Codina 2024-10-24 334 struct drm_atomic_state *state;
Almost everyone has their compiler set to zero out stack variables these days.
You should set this to struct drm_atomic_state *state = ERR_PTR(-EINVAL);.
caeb909b9ed830 Herve Codina 2024-10-24 335 int err;
caeb909b9ed830 Herve Codina 2024-10-24 336
caeb909b9ed830 Herve Codina 2024-10-24 337 /* Use operation done in drm_atomic_helper_suspend() followed by
caeb909b9ed830 Herve Codina 2024-10-24 338 * operation done in drm_atomic_helper_resume() but without releasing
caeb909b9ed830 Herve Codina 2024-10-24 339 * the lock between suspend()/resume()
caeb909b9ed830 Herve Codina 2024-10-24 340 */
caeb909b9ed830 Herve Codina 2024-10-24 341
caeb909b9ed830 Herve Codina 2024-10-24 342 DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
This macro has a goto in it.
caeb909b9ed830 Herve Codina 2024-10-24 343
caeb909b9ed830 Herve Codina 2024-10-24 344 state = drm_atomic_helper_duplicate_state(dev, &ctx);
caeb909b9ed830 Herve Codina 2024-10-24 345 if (IS_ERR(state)) {
caeb909b9ed830 Herve Codina 2024-10-24 346 err = PTR_ERR(state);
caeb909b9ed830 Herve Codina 2024-10-24 347 goto unlock;
caeb909b9ed830 Herve Codina 2024-10-24 348 }
caeb909b9ed830 Herve Codina 2024-10-24 349
caeb909b9ed830 Herve Codina 2024-10-24 350 err = drm_atomic_helper_disable_all(dev, &ctx);
caeb909b9ed830 Herve Codina 2024-10-24 351 if (err < 0)
caeb909b9ed830 Herve Codina 2024-10-24 352 goto unlock;
caeb909b9ed830 Herve Codina 2024-10-24 353
caeb909b9ed830 Herve Codina 2024-10-24 354 drm_mode_config_reset(dev);
caeb909b9ed830 Herve Codina 2024-10-24 355
caeb909b9ed830 Herve Codina 2024-10-24 356 err = drm_atomic_helper_commit_duplicated_state(state, &ctx);
caeb909b9ed830 Herve Codina 2024-10-24 357
caeb909b9ed830 Herve Codina 2024-10-24 358 unlock:
caeb909b9ed830 Herve Codina 2024-10-24 359 DRM_MODESET_LOCK_ALL_END(dev, ctx, err);
caeb909b9ed830 Herve Codina 2024-10-24 @360 if (!IS_ERR(state))
caeb909b9ed830 Herve Codina 2024-10-24 361 drm_atomic_state_put(state);
Calling drm_atomic_state_put(NULL) leads to an Oops.
caeb909b9ed830 Herve Codina 2024-10-24 362 return err;
caeb909b9ed830 Herve Codina 2024-10-24 363 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-10-28 8:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 9:55 [PATCH 0/2] Add support for errors recovery in the TI SN65DSI83 bridge driver Herve Codina
2024-10-24 9:55 ` [PATCH 1/2] dt-bindings: display: bridge: sn65dsi83: Add interrupt Herve Codina
2024-10-24 16:30 ` Conor Dooley
2024-10-27 15:01 ` Laurent Pinchart
2024-10-24 9:55 ` [PATCH 2/2] drm: bridge: ti-sn65dsi83: Add error recovery mechanism Herve Codina
2024-10-25 22:53 ` Marek Vasut
2024-10-28 8:02 ` Herve Codina
2024-10-28 11:47 ` Marek Vasut
2024-10-28 13:52 ` Herve Codina
2024-10-28 14:47 ` Marek Vasut
2024-10-28 18:19 ` Herve Codina
2024-10-27 16:23 ` Laurent Pinchart
2024-10-28 8:13 ` Herve Codina
2024-10-28 11:28 ` Laurent Pinchart
2024-10-28 12:21 ` Maxime Ripard
2024-10-28 13:28 ` Laurent Pinchart
2024-10-28 13:55 ` Maxime Ripard
2024-10-28 14:09 ` Laurent Pinchart
2024-11-05 8:15 ` Herve Codina
2024-11-05 9:47 ` Laurent Pinchart
2024-11-05 9:58 ` Maxime Ripard
2024-10-28 9:16 ` Maxime Ripard
2024-10-29 8:02 ` Andy Yan
2024-10-29 8:28 ` Maxime Ripard
2024-10-28 8:28 ` Dan Carpenter [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=9a16ee73-cdc9-47bc-88f7-2fed5fdad2ff@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=herve.codina@bootlin.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=thomas.petazzoni@bootlin.com \
--cc=tzimmermann@suse.de \
/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