]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gve: Fix various typos and improve code comments
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Mon, 16 Jun 2025 05:45:00 +0000 (22:45 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jun 2025 01:02:28 +0000 (18:02 -0700)
- Correct spelling and improves the clarity of comments
   "confiugration" -> "configuration"
   "spilt" -> "split"
   "It if is 0" -> "If it is 0"
   "DQ" -> "DQO" (correct abbreviation)
- Clarify BIT(0) flag usage in gve_get_priv_flags()
- Replaced hardcoded array size with GVE_NUM_PTYPES
  for clarity and maintainability.

These changes are purely cosmetic and do not affect functionality.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Joe Damato <joe@dama.to>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250616054504.1644770-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_adminq.c
drivers/net/ethernet/google/gve/gve_adminq.h
drivers/net/ethernet/google/gve/gve_ethtool.c
drivers/net/ethernet/google/gve/gve_main.c

index be4b5791c245c606ebbb4a46dd92eb8f6943b293..4469442d494005de2b0afd1fef7d8497ed0d789a 100644 (file)
@@ -789,7 +789,7 @@ struct gve_priv {
 
        struct gve_tx_queue_config tx_cfg;
        struct gve_rx_queue_config rx_cfg;
-       u32 num_ntfy_blks; /* spilt between TX and RX so must be even */
+       u32 num_ntfy_blks; /* split between TX and RX so must be even */
 
        struct gve_registers __iomem *reg_bar0; /* see gve_register.h */
        __be32 __iomem *db_bar2; /* "array" of doorbells */
index a0cc05a9eefc2428838a243aabe7658e6e7406f9..1ec223383a36166dd8697ec485e806d726186b6a 100644 (file)
@@ -650,7 +650,7 @@ static int gve_adminq_execute_extended_cmd(struct gve_priv *priv, u32 opcode,
 
 /* The device specifies that the management vector can either be the first irq
  * or the last irq. ntfy_blk_msix_base_idx indicates the first irq assigned to
- * the ntfy blks. It if is 0 then the management vector is last, if it is 1 then
+ * the ntfy blks. If it is 0 then the management vector is last, if it is 1 then
  * the management vector is first.
  *
  * gve arranges the msix vectors so that the management vector is last.
index f9f19e1357905ec675c4d493da850d6a9b3593a7..22a74b6aa17ea6e3019fee685b02b33149f33440 100644 (file)
@@ -476,7 +476,7 @@ struct gve_ptype_entry {
 };
 
 struct gve_ptype_map {
-       struct gve_ptype_entry ptypes[1 << 10]; /* PTYPES are always 10 bits. */
+       struct gve_ptype_entry ptypes[GVE_NUM_PTYPES]; /* PTYPES are always 10 bits. */
 };
 
 struct gve_adminq_get_ptype_map {
index 8dbd7639e1159573531fdb55c209a3823e6ce516..d0a223250845bcf716a9f768cc5ecf8de44ab9a4 100644 (file)
@@ -668,7 +668,7 @@ static u32 gve_get_priv_flags(struct net_device *netdev)
        struct gve_priv *priv = netdev_priv(netdev);
        u32 ret_flags = 0;
 
-       /* Only 1 flag exists currently: report-stats (BIT(O)), so set that flag. */
+       /* Only 1 flag exists currently: report-stats (BIT(0)), so set that flag. */
        if (priv->ethtool_flags & BIT(0))
                ret_flags |= BIT(0);
        return ret_flags;
index 7fff1409b1211ec5e4e7c094e1b0fa7923338b05..28e4795f5f40addf44de76c7f5f1daab4b1a3dbb 100644 (file)
@@ -1733,7 +1733,7 @@ int gve_adjust_config(struct gve_priv *priv,
 {
        int err;
 
-       /* Allocate resources for the new confiugration */
+       /* Allocate resources for the new configuration */
        err = gve_queues_mem_alloc(priv, tx_alloc_cfg, rx_alloc_cfg);
        if (err) {
                netif_err(priv, drv, priv->dev,
@@ -2284,7 +2284,7 @@ static int gve_init_priv(struct gve_priv *priv, bool skip_describe_device)
                goto err;
        }
 
-       /* Big TCP is only supported on DQ*/
+       /* Big TCP is only supported on DQ*/
        if (!gve_is_gqi(priv))
                netif_set_tso_max_size(priv->dev, GVE_DQO_TX_MAX);