[dpdk-dev] [PATCH v2 1/4] add missing static keyword to globals

Andrew Rybchenko arybchenko at solarflare.com
Fri Oct 5 17:55:56 CEST 2018


On 10/5/18 7:26 PM, Ferruh Yigit wrote:
> Some global variables can indeed be static, add static keyword to them.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
> ---
<...>

> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index 000cd0b20..e71ddd001 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -1126,7 +1126,7 @@ sfc_rx_qfini(struct sfc_adapter *sa, unsigned int sw_index)
>   /*
>    * Mapping between RTE RSS hash functions and their EFX counterparts.
>    */
> -struct sfc_rss_hf_rte_to_efx sfc_rss_hf_map[] = {
> +static struct sfc_rss_hf_rte_to_efx sfc_rss_hf_map[] = {

I'd prefer "static const" in fact

>   	{ ETH_RSS_NONFRAG_IPV4_TCP,
>   	  EFX_RX_HASH(IPV4_TCP, 4TUPLE) },
>   	{ ETH_RSS_NONFRAG_IPV4_UDP,

<...>

Acked-by: Andrew Rybchenko <arybchenko at solarflare.com>



More information about the dev mailing list