mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI: Remove unnecessary static initialization to false
@ 2026-07-30  5:33 Jiwon Kang
  2026-09-10 19:16 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Jiwon Kang @ 2026-07-30  5:33 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, Jiwon Kang

Static variables are zero-initialized by default, so explicitly
initializing to false is redundant. Remove the initializer to
follow kernel coding style.
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 77b17b13ee615..ee2beaacbc73f 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -6671,7 +6671,7 @@ static void of_pci_reserve_static_domain_nr(void)
 
 static int of_pci_bus_find_domain_nr(struct device *parent)
 {
-	static bool static_domains_reserved = false;
+	static bool static_domains_reserved;
 	int domain_nr;
 
 	/* On the first call scan device tree for static allocations. */
-- 
2.34.1


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

* Re: [PATCH] PCI: Remove unnecessary static initialization to false
  2026-07-30  5:33 [PATCH] PCI: Remove unnecessary static initialization to false Jiwon Kang
@ 2026-09-10 19:16 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2026-09-10 19:16 UTC (permalink / raw)
  To: Jiwon Kang; +Cc: bhelgaas, linux-pci, linux-kernel

On Thu, Jul 30, 2026 at 02:33:37PM +0900, Jiwon Kang wrote:
> Static variables are zero-initialized by default, so explicitly
> initializing to false is redundant. Remove the initializer to
> follow kernel coding style.

Thanks; can you repost this with a Signed-off-by?

> ---
>  drivers/pci/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 77b17b13ee615..ee2beaacbc73f 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -6671,7 +6671,7 @@ static void of_pci_reserve_static_domain_nr(void)
>  
>  static int of_pci_bus_find_domain_nr(struct device *parent)
>  {
> -	static bool static_domains_reserved = false;
> +	static bool static_domains_reserved;
>  	int domain_nr;
>  
>  	/* On the first call scan device tree for static allocations. */
> -- 
> 2.34.1
> 

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

end of thread, other threads:[~2026-09-10 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-30  5:33 [PATCH] PCI: Remove unnecessary static initialization to false Jiwon Kang
2026-09-10 19:16 ` Bjorn Helgaas

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®