From: "Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"Hari.PrasathGE@microchip.com" <Hari.PrasathGE@microchip.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3] drm/mediatek: fix uninitialized symbol
Date: Fri, 4 Aug 2023 02:04:43 +0000 [thread overview]
Message-ID: <a9a0425a5aa25228a8cd4a2c27fa7ce8d327c702.camel@mediatek.com> (raw)
In-Reply-To: <688a97b5-ce0c-cf6b-c78b-aa7410347d1d@microchip.com>
Hi Hari,
Thanks for the review.
On Thu, 2023-08-03 at 10:15 +0000, Hari.PrasathGE@microchip.com wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On 03/08/23 3:18 pm, Nancy.Lin wrote:
> > [You don't often get email from nancy.lin@mediatek.com. Learn why
> this is important at https://aka.ms/LearnAboutSenderIdentification ]
> >
> > EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> >
> > fix Smatch static checker warning
> > -Fix uninitialized symbol comp_pdev in mtk_ddp_comp_init.
> >
> > Fixes: 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub driver
> for MT8195")
> > Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
> > ---
> > v3: fix reviewer comment in v2
> > v2: add Fixes tag
> > ---
> > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> > index f114da4d36a9..771f4e173353 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> > @@ -563,14 +563,15 @@ int mtk_ddp_comp_init(struct device_node
> *node, struct mtk_ddp_comp *comp,
> > /* Not all drm components have a DTS device node, such as
> ovl_adaptor,
> > * which is the drm bring up sub driver
> > */
> > - if (node) {
> > - comp_pdev = of_find_device_by_node(node);
> > - if (!comp_pdev) {
> > - DRM_INFO("Waiting for device %s\n", node-
> >full_name);
> > - return -EPROBE_DEFER;
> > - }
> > - comp->dev = &comp_pdev->dev;
> > + if (!node)
> > + return 0;
> > +
> > + comp_pdev = of_find_device_by_node(node);
> > + if (!comp_pdev) {
> > + DRM_INFO("Waiting for device %s\n", node-
> >full_name);
> > + return -EPROBE_DEFER;
> > }
> > + comp->dev = &comp_pdev->dev;
> >
> > if (type == MTK_DISP_AAL ||
> > type == MTK_DISP_BLS ||
> > @@ -580,7 +581,6 @@ int mtk_ddp_comp_init(struct device_node *node,
> struct mtk_ddp_comp *comp,
> > type == MTK_DISP_MERGE ||
> > type == MTK_DISP_OVL ||
> > type == MTK_DISP_OVL_2L ||
> > - type == MTK_DISP_OVL_ADAPTOR ||
>
> Is this also a related change ?
>
These are the relevant modifications. MTK_DISP_OVL_ADAPTOR type
component is a sub-driver of DRM that does not have a DTS node. This
modification will return when checking if node is NULL, which means the
comp with MTK_DISP_OVL_ADAPTOR type will also return above. Therefore,
the condition "type == MTK_DISP_OVL_ADAPTOR" is unnecessary here.
Regards,
Nancy
> > type == MTK_DISP_PWM ||
> > type == MTK_DISP_RDMA ||
> > type == MTK_DPI ||
> > --
> > 2.18.0
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
next prev parent reply other threads:[~2023-08-04 2:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230803094843.4439-1-nancy.lin@mediatek.com>
2023-08-03 10:15 ` Hari.PrasathGE
2023-08-04 2:04 ` Nancy Lin (林欣螢) [this message]
2023-08-04 5:17 ` Hari.PrasathGE
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=a9a0425a5aa25228a8cd4a2c27fa7ce8d327c702.camel@mediatek.com \
--to=nancy.lin@mediatek.com \
--cc=Hari.PrasathGE@microchip.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Singo.Chang@mediatek.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.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
all inboxes | Powered by JetHome®