Re: [PATCH v2 01/19] locking/lockdep: Change all print_*() return type to void

2019-03-19 Thread Bart Van Assche
On Mon, 2019-03-18 at 02:45 -0700, Joe Perches wrote:
> > -static void
> > -print_circular_lock_scenario(struct held_lock *src,
> > -struct held_lock *tgt,
> > -struct lock_list *prt)
> > +static void print_circular_lock_scenario(struct held_lock *src,
> > +struct held_lock *tgt,
> > +struct lock_list *prt)
> 
> trivia:
> 
> This style change seems superfluous as many
> other existing functions use the previous style.

I share Joe's opinion. 

Bart.


Re: [PATCH v2 01/19] locking/lockdep: Change all print_*() return type to void

2019-03-18 Thread Yuyang Du
Thanks for the review.

On Mon, 18 Mar 2019 at 17:45, Joe Perches  wrote:
>
> On Mon, 2019-03-18 at 16:57 +0800, Yuyang Du wrote:
> > Since none of the print_*() function's return value is necessary, change
> > their return type to void. No functional change.
> >
> > In cases where an invariable return value is used, this change slightly
> > improves readability, i.e.:
> []
> > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> []
> > @@ -1430,23 +1430,20 @@ static inline int __bfs_backwards(struct lock_list 
> > *src_entry,
> []
> > -static void
> > -print_circular_lock_scenario(struct held_lock *src,
> > -  struct held_lock *tgt,
> > -  struct lock_list *prt)
> > +static void print_circular_lock_scenario(struct held_lock *src,
> > +  struct held_lock *tgt,
> > +  struct lock_list *prt)
>
> trivia:
>
> This style change seems superfluous as many
> other existing functions use the previous style.

Those "many other" are kind of bizarre already in the context of that
file IMHO. So the change went to great lengths in #05 :)


Re: [PATCH v2 01/19] locking/lockdep: Change all print_*() return type to void

2019-03-18 Thread Joe Perches
On Mon, 2019-03-18 at 16:57 +0800, Yuyang Du wrote:
> Since none of the print_*() function's return value is necessary, change
> their return type to void. No functional change.
> 
> In cases where an invariable return value is used, this change slightly
> improves readability, i.e.:
[]
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
[]
> @@ -1430,23 +1430,20 @@ static inline int __bfs_backwards(struct lock_list 
> *src_entry,
[]
> -static void
> -print_circular_lock_scenario(struct held_lock *src,
> -  struct held_lock *tgt,
> -  struct lock_list *prt)
> +static void print_circular_lock_scenario(struct held_lock *src,
> +  struct held_lock *tgt,
> +  struct lock_list *prt)

trivia:

This style change seems superfluous as many
other existing functions use the previous style.