>>> On 03.06.19 at 03:33, <[email protected]> wrote:
> 'notifier_block' can be replaced with 'list_head' when used for
> 'notifier_head', this make the a little more clear.

I guess you mean "... makes the code a little ..."?

> @@ -71,16 +71,16 @@ int notifier_call_chain(
>  {
>      int ret = NOTIFY_DONE;
>      struct list_head *cursor;
> -    struct notifier_block *nb;
> +    struct notifier_block *nb = NULL;
>      bool_t reverse = !!(val & NOTIFY_REVERSE);
>  
> -    cursor = &(pcursor && *pcursor ? *pcursor : &nh->head)->chain;
> +    cursor = (pcursor && *pcursor ? &(*pcursor)->chain : &nh->head);

The outermost parentheses are now not really needed anymore.

> --- a/xen/include/xen/notifier.h
> +++ b/xen/include/xen/notifier.h
> @@ -29,13 +29,12 @@ struct notifier_block {
>  };
>  
>  struct notifier_head {
> -    struct notifier_block head;
> +    struct list_head head;
>  };
>  
> -#define NOTIFIER_INIT(name) { .head.chain = LIST_HEAD_INIT(name.head.chain) }

Note the blanks immediately inside the figure braces - ...

> +#define NOTIFIER_HEAD(name)                                                  
>   \
> +  struct notifier_head name = {.head = LIST_HEAD_INIT(name.head)}

... please don't break such style aspects, unless you know
it is something that needs fixing (for being in violation of our
style guidelines).

Jan



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to