Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e1af35bc authored by Bhaktipriya Shridhar's avatar Bhaktipriya Shridhar Committed by Greg Kroah-Hartman
Browse files

staging: rdma: hfi1: Use setup_timer



The function setup_timer combines the initialization of a timer with the
initialization of the timer's function and data fields.

The multiline code for timer initialization is now replaced with function
setup_timer.

This was done with Coccinelle.

@@ expression e1, e2, e3; type T; @@
- init_timer(&e1);
...
(
- e1.function = e2;
...
- e1.data = (T)e3;
+ setup_timer(&e1, e2, (T)e3);
|
- e1.data = (T)e3;
...
- e1.function = e2;
+ setup_timer(&e1, e2, (T)e3);
|
- e1.function = e2;
+ setup_timer(&e1, e2, 0);
)

Signed-off-by: default avatarBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 995ae68c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment