common/sched: Correct function prototypes
PATCH 1/1 common/sched: Correct function prototypes
struct vcpu pointers are traditionally v rather than d.
George Dunlap <[email protected]>
--- xen/include/xen/sched.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/include/xen/sched.h +3 -3
@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);/* * Force synchronisation of given VCPU's state. If it is currently descheduled,
Signature · 1 line
1.7.10.4
Quoted 6 lines · Andrew Cooper
struct vcpu pointers are traditionally v rather than d.
Signed-off-by Andrew Cooper <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>George Dunlap <[email protected]>
Quoted 23 lines
--- xen/include/xen/sched.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)xen/include/xen/sched.h +3
-3@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);/* * Force synchronisation of given VCPU's state. If it is currently
descheduled,
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 6 lines · Andrew Cooper
struct vcpu pointers are traditionally v rather than d.
Signed-off-by Andrew Cooper <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>George Dunlap <[email protected]>
Acked-by Keir Fraser <[email protected]>
I'll commit it as is, but ...
Quoted 4 lines
Quoted 4 lines
xen/include/xen/sched.h +0
-0@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );
Quoted 8 lines
xen/include/xen/sched.h void sched_set_node_affinity(struct domain *, nodemask_t *); · line 572
Quoted 8 lines
xen/include/xen/sched.h +3
-3void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);
... I'd much prefer if we stopped naming parameters in declarations where the parameter types are already sufficiently describing them. You may have noted that for quite some time patches of mine have already been doing that (and a trace of this can even be seen in the patch hunk header above). I would even suggest adding a respective statement to the coding style document.
Jan
Quoted 14 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 6 lines · Andrew Cooper
struct vcpu pointers are traditionally v rather than d.
Signed-off-by Andrew Cooper <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>George Dunlap <[email protected]>
Acked-by Keir Fraser <[email protected]>I'll commit it as is, but ...
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
xen/include/xen/sched.h +0
-0@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );Quoted 8 lines
xen/include/xen/sched.h void sched_set_node_affinity(struct domain *, nodemask_t *); · line 572
Quoted 8 lines
xen/include/xen/sched.h +3
-3void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);... I'd much prefer if we stopped naming parameters in declarations where the parameter types are already sufficiently describing them.
I'd rather not -- I prefer the declarations to match the definitions.
Tim.
Quoted 20 lines
Quoted 1 line
Quoted 1 line · Tim Deegan
Quoted 17 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
xen/include/xen/sched.h void sched_set_node_affinity(struct domain *, nodemask_t *); · line 572
Quoted 12 lines · Andrew Cooper
xen/include/xen/sched.h +3
-3@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);... I'd much prefer if we stopped naming parameters in declarations where the parameter types are already sufficiently describing them.
Quoted 1 line
I'd rather not -- I prefer the declarations to match the definitions.
Any specific reason for that?
Jan
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · Tim Deegan
Quoted 17 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
xen/include/xen/sched.h void sched_set_node_affinity(struct domain *, nodemask_t *); · line 572
Quoted 12 lines · Andrew Cooper
xen/include/xen/sched.h +3
-3@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);... I'd much prefer if we stopped naming parameters in declarations where the parameter types are already sufficiently describing them.
Quoted 3 lines
Quoted 1 line
I'd rather not -- I prefer the declarations to match the definitions.
Any specific reason for that?
Nothing very strong -- I just find it easier to read, and more consistent (since we do need to keep the names of _some_ arguments).
I know there are lots of type-only declarations in the tree already, and I'm not suggesting we get rid of them, but I wouldn't like to see it become the prescribed coding style.
Cheers,
Tim.
Quoted 5 lines · Tim Deegan
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
... I'd much prefer if we stopped naming parameters in declarations where the parameter types are already sufficiently describing them.
I'd rather not -- I prefer the declarations to match the definitions.
Quoted 8 lines
Quoted 1 line
Any specific reason for that?
Nothing very strong -- I just find it easier to read, and more consistent (since we do need to keep the names of _some_ arguments).
I know there are lots of type-only declarations in the tree already, and I'm not suggesting we get rid of them, but I wouldn't like to see it become the prescribed coding style.
I agree with this.
-- Keir
Quoted 23 lines · Tim Deegan
Quoted 22 lines · Jan Beulich
Quoted 21 lines
Quoted 1 line
Quoted 1 line · Tim Deegan
Quoted 17 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
xen/include/xen/sched.h void sched_set_node_affinity(struct domain *, nodemask_t *); · line 572
Quoted 12 lines · Andrew Cooper
xen/include/xen/sched.h +3
-3@@ -567,9 +567,9 @@ void sched_set_node_affinity(struct domain *, nodemask_t *);int sched_id (void );void sched_tick_suspend (void );void sched_tick_resume (void ); -void vcpu_wake (struct vcpu *d); -void vcpu_sleep_nosync (struct vcpu *d); -void vcpu_sleep_sync (struct vcpu *d); +void vcpu_wake (struct vcpu *v); +void vcpu_sleep_nosync (struct vcpu *v); +void vcpu_sleep_sync (struct vcpu *v);... I'd much prefer if we stopped naming parameters in declarations where the parameter types are already sufficiently describing them.
I'd rather not -- I prefer the declarations to match the definitions.
Quoted 8 lines
Quoted 1 line
Any specific reason for that?
Nothing very strong -- I just find it easier to read, and more consistent (since we do need to keep the names of _some_ arguments).
I know there are lots of type-only declarations in the tree already, and I'm not suggesting we get rid of them, but I wouldn't like to see it become the prescribed coding style.
+1