lkml.org 
[lkml]   [2019]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kbuild: Enable -Wsometimes-uninitialized
On Tue, Apr 30, 2019 at 11:46:44AM +0200, Arnd Bergmann wrote:
> Ah, I thought they were all fixed, as I don't see any remaining warnings
> in my tree. It seems that I never send this workaround for
> DECLARE_WAIT_QUEUE_HEAD_ONSTACK:
>
> diff --git a/include/linux/wait.h b/include/linux/wait.h
> index 5f3efabc36f4..cbe1ea0fce84 100644
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
> @@ -68,8 +68,15 @@ extern void __init_waitqueue_head(struct
> wait_queue_head *wq_head, const char *n
> } while (0)
>
> #ifdef CONFIG_LOCKDEP
> -# define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \
> - ({ init_waitqueue_head(&name); name; })
> +# define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) {
> \
> + .lock = __SPIN_LOCK_UNLOCKED(name.lock),
> \
> + .head = ({
> \
> + static struct lock_class_key __key;
> \
> + lockdep_set_class_and_name(&(name).lock, &__key, #
> name); \
> + (struct list_head){ &(name).head, &(name).head };
> \
> + }),
> \
> +}
> +
> # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \
> struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> #else
>
> Are there any others you see?
>
> Arnd

Hi Arnd,

Were you planning on sending this out for review? It would be nice to
get these fixed so we can get this warning enabled.

I am bumping the other patches/inquiries I have sent now.

Cheers,
Nathan

\
 
 \ /
  Last update: 2019-05-23 03:51    [W:0.076 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site