Re: [PATCH 1/3] i2c: update i2c_trace_msg static key to modern api
From: Peter Zijlstra
Date: Mon Mar 26 2018 - 04:34:16 EST
On Sun, Mar 25, 2018 at 12:10:54PM -0700, Davidlohr Bueso wrote:
> @@ -1848,11 +1848,11 @@ int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
> if (adap->quirks && i2c_check_for_quirks(adap, msgs, num))
> return -EOPNOTSUPP;
>
> - /* i2c_trace_msg gets enabled when tracepoint i2c_transfer gets
> + /* i2c_trace_msg_key gets enabled when tracepoint i2c_transfer gets
> * enabled. This is an efficient way of keeping the for-loop from
> * being executed when not needed.
> */
> - if (static_key_false(&i2c_trace_msg)) {
> + if (static_branch_unlikely(&i2c_trace_msg_key)) {
broken comment style.