lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [net-next PATCH v3 5/5] net: mdiobus: Introduce fwnode_mdiobus_register_phy()
On Thu, May 7, 2020 at 10:44 AM Calvin Johnson
<calvin.johnson@oss.nxp.com> wrote:
>
> On Tue, May 05, 2020 at 05:22:00PM +0300, Andy Shevchenko wrote:
> > On Tue, May 5, 2020 at 4:30 PM Calvin Johnson
> > <calvin.johnson@oss.nxp.com> wrote:

...

> > > + bool is_c45 = false;
> >
> > Redundant assignment, see below.
> >
> > > + const char *cp;
> > > + u32 phy_id;
> > > + int rc;

> > > + fwnode_property_read_string(child, "compatible", &cp);
> >
> > Consider rc = ...; otherwise you will have UB below.
> >
> > > + if (!strcmp(cp, "ethernet-phy-ieee802.3-c45"))
> >
> > UB!
>
> Thanks for the comments! I've considered all of them.
> What is UB, by the way? :)-

Undefined Behaviour.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-05-07 11:12    [W:0.178 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site