From: abhinavk@codeaurora.org
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, Chandan Uddaraju <chandanu@codeaurora.org>,
lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org, Rob Clark <robdclark@chromium.org>,
Vara Reddy <varar@codeaurora.org>,
Tanmay Shah <tanmay@codeaurora.org>,
Kuogee Hsieh <khsieh@codeaurora.org>,
Guenter Roeck <groeck@chromium.org>,
Stephen Boyd <swboyd@chromium.org>
Subject: Re: drivers/gpu/drm/msm/dp/dp_hpd.c:37 dp_hpd_connect() error: we previously assumed 'hpd_priv->dp_cb' could be null (see line 37)
Date: Wed, 03 Mar 2021 16:26:47 -0800 [thread overview]
Message-ID: <3e209334ecda37998ba7bc0982b1a463@codeaurora.org> (raw)
In-Reply-To: <20210301070235.GM2087@kadam>
Hi Dan
Thanks for reporting this, will submit a change to fix this.
Abhinav
On 2021-02-28 23:02, Dan Carpenter wrote:
> tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
> commit: c943b4948b5848fc0e07f875edbd35a973879e22 drm/msm/dp: add
> displayPort driver support
> config: arm64-randconfig-m031-20210301 (attached as .config)
> compiler: aarch64-linux-gcc (GCC) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> smatch warnings:
> drivers/gpu/drm/msm/dp/dp_hpd.c:37 dp_hpd_connect() error: we
> previously assumed 'hpd_priv->dp_cb' could be null (see line 37)
> drivers/gpu/drm/msm/dp/dp_power.c:203 dp_power_clk_enable() warn:
> inconsistent indenting
>
> vim +37 drivers/gpu/drm/msm/dp/dp_hpd.c
>
> c943b4948b5848 Chandan Uddaraju 2020-08-27 27 static int
> dp_hpd_connect(struct dp_usbpd *dp_usbpd, bool hpd)
> c943b4948b5848 Chandan Uddaraju 2020-08-27 28 {
> c943b4948b5848 Chandan Uddaraju 2020-08-27 29 int rc = 0;
> c943b4948b5848 Chandan Uddaraju 2020-08-27 30 struct dp_hpd_private
> *hpd_priv;
> c943b4948b5848 Chandan Uddaraju 2020-08-27 31
> c943b4948b5848 Chandan Uddaraju 2020-08-27 32 hpd_priv =
> container_of(dp_usbpd, struct dp_hpd_private,
> c943b4948b5848 Chandan Uddaraju 2020-08-27 33 dp_usbpd);
> c943b4948b5848 Chandan Uddaraju 2020-08-27 34
> c943b4948b5848 Chandan Uddaraju 2020-08-27 35 dp_usbpd->hpd_high =
> hpd;
> c943b4948b5848 Chandan Uddaraju 2020-08-27 36
> c943b4948b5848 Chandan Uddaraju 2020-08-27 @37 if (!hpd_priv->dp_cb
> && !hpd_priv->dp_cb->configure
>
> ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Probably || was intended instead of &&. If "hpd_priv->dp_cb" is NULL
> this will Oops.
>
> c943b4948b5848 Chandan Uddaraju 2020-08-27 38 &&
> !hpd_priv->dp_cb->disconnect) {
> c943b4948b5848 Chandan Uddaraju 2020-08-27 39 pr_err("hpd dp_cb
> not initialized\n");
> c943b4948b5848 Chandan Uddaraju 2020-08-27 40 return -EINVAL;
> c943b4948b5848 Chandan Uddaraju 2020-08-27 41 }
> c943b4948b5848 Chandan Uddaraju 2020-08-27 42 if (hpd)
> c943b4948b5848 Chandan Uddaraju 2020-08-27 43
> hpd_priv->dp_cb->configure(hpd_priv->dev);
> c943b4948b5848 Chandan Uddaraju 2020-08-27 44 else
> c943b4948b5848 Chandan Uddaraju 2020-08-27 45
> hpd_priv->dp_cb->disconnect(hpd_priv->dev);
> c943b4948b5848 Chandan Uddaraju 2020-08-27 46
> c943b4948b5848 Chandan Uddaraju 2020-08-27 47 return rc;
> c943b4948b5848 Chandan Uddaraju 2020-08-27 48 }
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
prev parent reply other threads:[~2021-03-04 1:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 7:02 drivers/gpu/drm/msm/dp/dp_hpd.c:37 dp_hpd_connect() error: we previously assumed 'hpd_priv->dp_cb' could be null (see line 37) Dan Carpenter
2021-03-04 0:26 ` abhinavk [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=3e209334ecda37998ba7bc0982b1a463@codeaurora.org \
--to=abhinavk@codeaurora.org \
--cc=chandanu@codeaurora.org \
--cc=dan.carpenter@oracle.com \
--cc=groeck@chromium.org \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=khsieh@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=robdclark@chromium.org \
--cc=swboyd@chromium.org \
--cc=tanmay@codeaurora.org \
--cc=varar@codeaurora.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