[PATCH v4 1/9] phy: add phy_get_bus_width()/phy_set_bus_width() calls

From
Russell King - ARM Linux <hidden>
Date
2013-12-12 11:27:47
Also in
linux-devicetree, lkml
Reply to
Matt Porter, 2013-12-12
On Thu, Dec 12, 2013 at 06:18:29AM -0500, Matt Porter wrote:
quoted hunk ↗ jump to hunk
 /**
+ * struct phy_attrs - represents phy attributes
+ * @bus_width: Data path width implemented by PHY
+ */
+struct phy_attrs {
+	u32			bus_width;
Why u32?
quoted hunk ↗ jump to hunk
 int phy_power_off(struct phy *phy);
+static inline u32 phy_get_bus_width(struct phy *phy)
+{
+	return phy->attrs.bus_width;
...
quoted hunk ↗ jump to hunk
 
+static inline u32 phy_get_bus_width(struct phy *phy)
+{
+	return -ENOSYS;
Why u32, especially as you're returning a negative number here.

If the bus width is a small integer (I'm assuming you don't have up to
2^30 bus signals) then what's wrong with it being an 'int' ?
Thread (12 messages) 12 messages, 2 authors, last reply 2013-12-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help