Subject: Re: [PATCH net] gve: unify driver name usage

From: Jakub Kicinski <[email-masked]>
Date: Fri, 7 Jul 2023 15:20:24 -0700

On Fri,  7 Jul 2023 18:37:10 +0800 Junfeng Guo wrote:
> Current codebase contained the usage of two different names for this
> driver (i.e., `gvnic` and `gve`), which is quite unfriendly for users
> to use, especially when trying to bind or unbind the driver manually.
> The corresponding kernel module is registered with the name of `gve`.
> It's more reasonable to align the name of the driver with the module.
> 
> Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
> Cc: [email-masked]
> Signed-off-by: Junfeng Guo <[email-masked]>

Google's maintainers definitely need to agree to this, because it's 
a user visible change. It can very well break someone's scripts.

> diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
> index 98eb78d98e9f..4b425bf71ede 100644
> --- a/drivers/net/ethernet/google/gve/gve.h
> +++ b/drivers/net/ethernet/google/gve/gve.h
> @@ -964,5 +964,6 @@ void gve_handle_report_stats(struct gve_priv *priv);
>  /* exported by ethtool.c */
>  extern const struct ethtool_ops gve_ethtool_ops;
>  /* needed by ethtool */
> +extern char gve_driver_name[];
>  extern const char gve_version_str[];
>  #endif /* _GVE_H_ */
> diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
> index 252974202a3f..ae8f8c935bbe 100644
> --- a/drivers/net/ethernet/google/gve/gve_adminq.c
> +++ b/drivers/net/ethernet/google/gve/gve_adminq.c
> @@ -899,7 +899,7 @@ int gve_adminq_verify_driver_compatibility(struct gve_priv *priv,
>  
>  int gve_adminq_report_link_speed(struct gve_priv *priv)
>  {
> -	union gve_adminq_command gvnic_cmd;
> +	union gve_adminq_command gve_cmd;
>  	dma_addr_t link_speed_region_bus;
>  	__be64 *link_speed_region;
>  	int err;
> @@ -911,12 +911,12 @@ int gve_adminq_report_link_speed(struct gve_priv *priv)
>  	if (!link_speed_region)
>  		return -ENOMEM;
>  
> -	memset(&gvnic_cmd, 0, sizeof(gvnic_cmd));
> -	gvnic_cmd.opcode = cpu_to_be32(GVE_ADMINQ_REPORT_LINK_SPEED);
> -	gvnic_cmd.report_link_speed.link_speed_address =
> +	memset(&gve_cmd, 0, sizeof(gve_cmd));
> +	gve_cmd.opcode = cpu_to_be32(GVE_ADMINQ_REPORT_LINK_SPEED);
> +	gve_cmd.report_link_speed.link_speed_address =
>  		cpu_to_be64(link_speed_region_bus);
>  
> -	err = gve_adminq_execute_cmd(priv, &gvnic_cmd);
> +	err = gve_adminq_execute_cmd(priv, &gve_cmd);

What's the problem with the variable being called gvnic_cmd ?
Please limit renames, if you want this to be a fix.
-- 
pw-bot: cr