Thread (24 messages) flat view 24 messages, 5 authors, 2017-06-19
DORMANTno replies

[PATCH v4 03/11] net: mvmdio: use GENMASK for masks

From: davem@davemloft.net (David Miller)
Date: 2017-06-19 14:49:26
Also in: netdev

From: David Laight <redacted>
Date: Mon, 19 Jun 2017 11:57:51 +0000
From: Antoine Tenart
quoted
Sent: 14 June 2017 16:49
Cosmetic patch to use the GENMASK helper for masks.
...
quoted
-	ret = val & 0xFFFF;
+	ret = val & GENMASK(15, 0);
My 2c: It isn't at all clear to me that changes like this in anyway
improve the code readability.
In some sense the '15' should be a named constant - but that just makes
it even less obvious what is going on.
I agree, a hexidecimal mask of 0xffff is 100 times more readable and
understandable to me than "SOME_MACRO(x, y)".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help