Thread (15 messages) flat view 15 messages, 6 authors, 2016-02-07

Re: [PATCH net-next v5 1/2] ethtool: add speed/duplex validation functions

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2016-02-03 23:32:37

On Wed,  3 Feb 2016 04:04:36 +0100
Nikolay Aleksandrov [off-list ref] wrote:
 
+static inline int ethtool_validate_speed(__u32 speed)
+{

No need for inline.

But why check for valid value at all. At some point in the
future, there will be yet another speed adopted by some standard body
and the switch statement would need another value.

Why not accept any value? This is a virtual device.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help