mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] completion: Use designated initializers for struct completion
@ 2025-09-11 10:30 Thorsten Blum
  2025-09-18 14:47 ` Valentin Schneider
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-09-11 10:30 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider
  Cc: Thorsten Blum, linux-kernel

Switch COMPLETION_INITIALIZER to the more modern and flexible designated
initializers. This improves readability and allows struct fields to be
reordered.  No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 include/linux/completion.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/completion.h b/include/linux/completion.h
index fb2915676574..36291cb3c0df 100644
--- a/include/linux/completion.h
+++ b/include/linux/completion.h
@@ -33,7 +33,7 @@ static inline void complete_acquire(struct completion *x) {}
 static inline void complete_release(struct completion *x) {}
 
 #define COMPLETION_INITIALIZER(work) \
-	{ 0, __SWAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
+	{ .done = 0, .wait = __SWAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
 
 #define COMPLETION_INITIALIZER_ONSTACK_MAP(work, map) \
 	(*({ init_completion_map(&(work), &(map)); &(work); }))
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] completion: Use designated initializers for struct completion
  2025-09-11 10:30 [PATCH] completion: Use designated initializers for struct completion Thorsten Blum
@ 2025-09-18 14:47 ` Valentin Schneider
  0 siblings, 0 replies; 2+ messages in thread
From: Valentin Schneider @ 2025-09-18 14:47 UTC (permalink / raw)
  To: Thorsten Blum, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman
  Cc: Thorsten Blum, linux-kernel

On 11/09/25 12:30, Thorsten Blum wrote:
> Switch COMPLETION_INITIALIZER to the more modern and flexible designated
> initializers. This improves readability and allows struct fields to be
> reordered.  No functional changes intended.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Valentin Schneider <vschneid@redhat.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-18 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-11 10:30 [PATCH] completion: Use designated initializers for struct completion Thorsten Blum
2025-09-18 14:47 ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®