[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C246CAC1457055469EF09E3A7AC4E11A4A5BAB75@XAP-PVEXMBX01.xlnx.xilinx.com>
Date: Fri, 1 Jul 2016 13:07:29 +0000
From: Appana Durga Kedareswara Rao <appana.durga.rao@...inx.com>
To: Nicolas Ferre <nicolas.ferre@...el.com>,
Michal Simek <michals@...inx.com>,
Punnaiah Choudary Kalluri <punnaia@...inx.com>,
Anirudha Sarangi <anirudh@...inx.com>,
Harini Katakam <harinik@...inx.com>,
Florian Fainelli <f.fainelli@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH 2/2] net: macb: Add gmii2rgmii phy converter support
Hi,
> >>> +static inline void macb_hw_fix_mac_speed(struct macb *bp,
> >>> + struct phy_device *phydev)
> >>> +{
> >>> + if (likely(bp->converter_phy.fix_mac_speed))
> >>
> >> What is the purpose of this branch bias? The code isn't in some hot
> >> path, so I suspect that its not needed.
> >
> > If we won't put this check driver will crash with NULL pointer
> > dereference for the below cases
>
> I know that...
>
> > ---> Converter driver is disabled
> > ---> Converter driver is enabled but the converter probe is not called from the
> macb driver.
>
> I didn't make myself clear: It's not the branch itself that I'm talking about it's the
> branch profiling directive "likely()" that seems not necessary.
Ok will remove in the next version...
Regards,
Kedar.
Powered by blists - more mailing lists