On Thu, May 28, 2015 at 2:18 AM, David Laight <david.lai...@aculab.com> wrote: > From: Simon Horman >> Sent: 28 May 2015 04:23 >> The rocker (switch) of a rocker_port may be trivially obtained from >> the latter it seems cleaner not to pass the former to a function when >> the latter is being passed anyway. > > If the arguments are passed in registers (they almost certainly are) > or the function is inlined (possible since they are static) and > the calling code already has both values in registers then > passing both values saves a memory read inside the called code. > > So on 'hot paths' it probably makes sense to pass both values.
Agreed, and Simon's patch is 99% cold path, so I'd rather trade clarity in the code than saving a nanosec in a driver cold path. Simon, would you respin, remove rocker_port_rx_proc() changes, remove RFC, and add my ack? rocker_port_rx_proc() was the only hot path case I found. -scott -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html