diff mbox series

[iwl-next,v2,8/9] ice: Remove redundant zeroing of the fields.

Message ID 20230819094239.15304-1-paul.greenwalt@intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series ice: Add basic E830 support | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1345 this patch: 1345
netdev/cc_maintainers warning 5 maintainers not CCed: kuba@kernel.org davem@davemloft.net anthony.l.nguyen@intel.com pabeni@redhat.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1368 this patch: 1368
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 58 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Paul Greenwalt Aug. 19, 2023, 9:42 a.m. UTC
From: Pawel Chmielewski <pawel.chmielewski@intel.com>

Remove zeroing of the fields, as all the fields are in fact initialized
with zeros automatically

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 52 +++++++++++------------
 1 file changed, 26 insertions(+), 26 deletions(-)

Comments

Alexander Lobakin Aug. 21, 2023, 1:10 p.m. UTC | #1
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Sat, 19 Aug 2023 02:42:39 -0700

> From: Pawel Chmielewski <pawel.chmielewski@intel.com>
> 
> Remove zeroing of the fields, as all the fields are in fact initialized
> with zeros automatically
> 
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
> Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_main.c | 52 +++++++++++------------
>  1 file changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index ffed5543a5aa..d6715a89ec78 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -5605,32 +5605,32 @@ static void ice_pci_err_reset_done(struct pci_dev *pdev)
>   *   Class, Class Mask, private data (not used) }
>   */
>  static const struct pci_device_id ice_pci_tbl[] = {
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_BACKPLANE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_QSFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_SFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_BACKPLANE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_QSFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_SFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_BACKPLANE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_QSFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_10G_BASE_T), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SGMII), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_BACKPLANE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_QSFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_10G_BASE_T), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SGMII), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_BACKPLANE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_10G_BASE_T), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SGMII), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_BACKPLANE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_SFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_10G_BASE_T), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_1GBE), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_QSFP), 0 },
> -	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822_SI_DFLT), 0 },
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_BACKPLANE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_QSFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_SFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_BACKPLANE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_QSFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_SFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_BACKPLANE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_QSFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_10G_BASE_T)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SGMII)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_BACKPLANE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_QSFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_10G_BASE_T)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SGMII)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_BACKPLANE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_10G_BASE_T)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SGMII)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_BACKPLANE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_SFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_10G_BASE_T)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_1GBE)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_QSFP)},
> +	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822_SI_DFLT)},

If you want to remove them, please keep the code style consistent. If
you have a space after the opening brace (which is correct), leave a
space before the closing one:

	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822_SI_DFLT) },

>  	/* required last entry */
>  	{ 0, }

Why wasn't this one addressed? :D

	/* required last entry */
	{ }

or (saves 1 line):

	{ /* required last entry */ }

>  };

Thanks,
Olek
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index ffed5543a5aa..d6715a89ec78 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5605,32 +5605,32 @@  static void ice_pci_err_reset_done(struct pci_dev *pdev)
  *   Class, Class Mask, private data (not used) }
  */
 static const struct pci_device_id ice_pci_tbl[] = {
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_BACKPLANE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_QSFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_SFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_BACKPLANE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_QSFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_SFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_BACKPLANE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_QSFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_10G_BASE_T), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SGMII), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_BACKPLANE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_QSFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_10G_BASE_T), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SGMII), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_BACKPLANE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_10G_BASE_T), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SGMII), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_BACKPLANE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_SFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_10G_BASE_T), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_1GBE), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_QSFP), 0 },
-	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822_SI_DFLT), 0 },
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_BACKPLANE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_QSFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810C_SFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_BACKPLANE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_QSFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E810_XXV_SFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_BACKPLANE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_QSFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_10G_BASE_T)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823C_SGMII)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_BACKPLANE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_QSFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_10G_BASE_T)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822C_SGMII)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_BACKPLANE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_10G_BASE_T)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822L_SGMII)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_BACKPLANE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_SFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_10G_BASE_T)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_1GBE)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E823L_QSFP)},
+	{ PCI_VDEVICE(INTEL, ICE_DEV_ID_E822_SI_DFLT)},
 	/* required last entry */
 	{ 0, }
 };