Thread (13 messages) flat view 13 messages, 4 authors, 2016-07-01

RE: [RFC PATCH 2/2] net: macb: Add gmii2rgmii phy converter support

From: Appana Durga Kedareswara Rao <hidden>
Date: 2016-07-01 13:09:25
Also in: lkml

Hi,
quoted
quoted
quoted
+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...
quoted
---> 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help