<pre>
Hi CK and Fei,

Thanks for the review.

On Thu, 2023-07-20 at 07:52 +0000, CK Hu (胡俊光) wrote:
> Hi, Fei:
>
> On Mon, 2023-07-17 at 11:59 +0800, Fei Shao wrote:
> >
> > External email : Please do not click links or open attachments
> > until
> > you have verified the sender or the content.
> > Hi CK,
> >
> > On Fri, Jul 14, 2023 at 5:27 PM CK Hu (胡俊光) <ck.hu@mediatek.com>
> > wrote:
> > >
> > > Hi, Nancy:
> > >
> > > On Fri, 2023-04-21 at 10:16 +0800, Nancy.Lin wrote:
> >
> > snip
> > >
> > > In line 566, the statement is
> > >
> > > if (nodo) {
> > > comp_pdev = ...
> > > }
> > >
> > > The comment says that only ovl_adaptoer has no device node, so
> > > the
> > > checking should be
> > >
> > > if (type != MTK_DISP_OVL_ADAPTOR) {
> > > comp_pdev = ...
> > > }
> > >
> > > and later it would return when type = MTK_DISP_OVL_ADAPTOR,
> > > so there would be no problem of uninitialized symbol.
> >
> > That sounds fair, but IIUC what Nancy tries to resolve here is the
> > false-positive Smatch warning.
> > How about this: given the `if (node)` block was exclusively added
> > for
> > ovl_adaptor in [1], plus the init function will immediately return
> > after that in this case, it should be safe to do the following
> >
> > ```
> > /* Not all drm components have a DTS device node... */
> > if (node == NULL)
> > return 0;
> >
> > comp_pdev = of_find_device_by_node(node);
> > ...
> >
> > if (type == MTK_DISP_AAL ||
> > ...
> > ```
> >
> > which is equivalent to adding a `node == NULL` check before [1].
> > This should suppress the Smatch warning because `comp_pdev` will be
> > (again) unconditionally assigned to something, and the `type ==
> > MTK_DISP_OVL_ADAPTOR` line can be dropped also (optional?).
>
> This solution also looks good to me.
>
> Regards,
> CK
>
I will send the next version of modifications based on your
suggestions.

Thanks,
Nancy

> >
> > [1]: commit 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub
> > driver for MT8195")
> >
> > Regards,
> > Fei

</pre><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->