mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* (no subject)
@ 2025-03-11 22:15 Joao Bonifacio
  2025-03-11 22:15 ` [PATCH 1/2] net: intel: Remove unnecessary static variable initialization Joao Bonifacio
  0 siblings, 1 reply; 3+ messages in thread
From: Joao Bonifacio @ 2025-03-11 22:15 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: Przemek Kitszel, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, intel-wired-lan, netdev,
	linux-kernel


The following is a small change made to the file removing the zero values from the initializations.

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

* [PATCH 1/2] net: intel: Remove unnecessary static variable initialization
  2025-03-11 22:15 Joao Bonifacio
@ 2025-03-11 22:15 ` Joao Bonifacio
  2025-03-12  8:02   ` Przemek Kitszel
  0 siblings, 1 reply; 3+ messages in thread
From: Joao Bonifacio @ 2025-03-11 22:15 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: Przemek Kitszel, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, intel-wired-lan, netdev,
	linux-kernel, Joao Bonifacio

Static variables in C are implicitly initialized to zero,
so there is no need to explicitly set
and  to 0. This change removes the redundant initialization

Signed-off-by: Joao Bonifacio <joaoboni017@gmail.com>
---
 drivers/net/ethernet/intel/e100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 3a5bbda235cb..f5d32663a89a 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -167,8 +167,8 @@ MODULE_FIRMWARE(FIRMWARE_D101S);
 MODULE_FIRMWARE(FIRMWARE_D102E);
 
 static int debug = 3;
-static int eeprom_bad_csum_allow = 0;
-static int use_io = 0;
+static int eeprom_bad_csum_allow;
+static int use_io;
 module_param(debug, int, 0);
 module_param(eeprom_bad_csum_allow, int, 0444);
 module_param(use_io, int, 0444);
-- 
2.48.1


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

* Re: [PATCH 1/2] net: intel: Remove unnecessary static variable initialization
  2025-03-11 22:15 ` [PATCH 1/2] net: intel: Remove unnecessary static variable initialization Joao Bonifacio
@ 2025-03-12  8:02   ` Przemek Kitszel
  0 siblings, 0 replies; 3+ messages in thread
From: Przemek Kitszel @ 2025-03-12  8:02 UTC (permalink / raw)
  To: Joao Bonifacio
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, intel-wired-lan, netdev, linux-kernel, Tony Nguyen

On 3/11/25 23:15, Joao Bonifacio wrote:
> Static variables in C are implicitly initialized to zero,
> so there is no need to explicitly set
> and  to 0. This change removes the redundant initialization

Thank you for reaching out, and sorry, but this change by itself is too
trivial, see:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#clean-up-patches

some feedback anyway:
the Subject line of this patch is too generic
whitespace formatting of the next paragraph of commit message is off

for networking we tag patches as "net" (fixes) and "next-net" (the rest)
and in particular for series that are mostly Intel eth we tag instead as
"iwl-net" and "iwl-next"

> 
> Signed-off-by: Joao Bonifacio <joaoboni017@gmail.com>
> ---
>   drivers/net/ethernet/intel/e100.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
> index 3a5bbda235cb..f5d32663a89a 100644
> --- a/drivers/net/ethernet/intel/e100.c
> +++ b/drivers/net/ethernet/intel/e100.c
> @@ -167,8 +167,8 @@ MODULE_FIRMWARE(FIRMWARE_D101S);
>   MODULE_FIRMWARE(FIRMWARE_D102E);
>   
>   static int debug = 3;
> -static int eeprom_bad_csum_allow = 0;
> -static int use_io = 0;
> +static int eeprom_bad_csum_allow;
> +static int use_io;
>   module_param(debug, int, 0);
>   module_param(eeprom_bad_csum_allow, int, 0444);
>   module_param(use_io, int, 0444);


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

end of thread, other threads:[~2025-03-12  8:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-11 22:15 Joao Bonifacio
2025-03-11 22:15 ` [PATCH 1/2] net: intel: Remove unnecessary static variable initialization Joao Bonifacio
2025-03-12  8:02   ` Przemek Kitszel

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®