diff mbox series

[next,S82,9/9] i40e: Suppress compilation warning on kernels older than 3.12

Message ID 20171103110511.76793-9-alice.michael@intel.com
State Changes Requested
Headers show
Series [next,S82,1/9] i40evf: Do not clear MSI-X PBA manually | expand

Commit Message

Michael, Alice Nov. 3, 2017, 11:05 a.m. UTC
From: Paweł Jabłoński <pawel.jablonski@intel.com>

In kernels before 3.12 the second parameter in netif_set_xps_queue
function has no const qualifier. It is generating warning in older
kernels. get_cpu_mask function always returns a pointer with const
qualifier. Adding the cast is enough to remove compilation warning.

Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Shannon Nelson Nov. 3, 2017, 8:12 p.m. UTC | #1
On 11/3/2017 4:05 AM, Alice Michael wrote:
> From: Paweł Jabłoński <pawel.jablonski@intel.com>
> 
> In kernels before 3.12 the second parameter in netif_set_xps_queue
> function has no const qualifier. It is generating warning in older
> kernels. get_cpu_mask function always returns a pointer with const
> qualifier. Adding the cast is enough to remove compilation warning.
> 
> Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 8657ef6..1fe8099 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
>   		return;
>   
>   	cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
> -	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
> -			    ring->queue_index);
> +	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu), ring->queue_index);

I see no actual code change here, no cast as advertised.
sln

>   }
>   
>   /**
>
Jablonski, Pawel Nov. 6, 2017, 9:41 a.m. UTC | #2
This patch is only for older kernels (where the driver is compiling form source on older systems). In newest ones is not needed.

-----Original Message-----
From: Shannon Nelson [mailto:shannon.nelson@oracle.com] 

Sent: Friday, November 3, 2017 9:13 PM
To: Michael, Alice <alice.michael@intel.com>; intel-wired-lan@lists.osuosl.org
Cc: Jablonski, Pawel <pawel.jablonski@intel.com>
Subject: Re: [Intel-wired-lan] [next PATCH S82 9/9] i40e: Suppress compilation warning on kernels older than 3.12

On 11/3/2017 4:05 AM, Alice Michael wrote:
> From: Paweł Jabłoński <pawel.jablonski@intel.com>

> 

> In kernels before 3.12 the second parameter in netif_set_xps_queue 

> function has no const qualifier. It is generating warning in older 

> kernels. get_cpu_mask function always returns a pointer with const 

> qualifier. Adding the cast is enough to remove compilation warning.

> 

> Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>

> ---

>   drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--

>   1 file changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c 

> b/drivers/net/ethernet/intel/i40e/i40e_main.c

> index 8657ef6..1fe8099 100644

> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c

> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c

> @@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)

>   		return;

>   

>   	cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);

> -	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),

> -			    ring->queue_index);

> +	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu), 

> +ring->queue_index);


I see no actual code change here, no cast as advertised.
sln

>   }

>   

>   /**

> 

--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
Shannon Nelson Nov. 7, 2017, 2:04 p.m. UTC | #3
On 11/6/2017 1:41 AM, Jablonski, Pawel wrote:
> This patch is only for older kernels (where the driver is compiling form source on older systems). In newest ones is not needed.

Then there's no need for it to be pushed upstream.
sln


> 
> -----Original Message-----
> From: Shannon Nelson [mailto:shannon.nelson@oracle.com]
> Sent: Friday, November 3, 2017 9:13 PM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-lan@lists.osuosl.org
> Cc: Jablonski, Pawel <pawel.jablonski@intel.com>
> Subject: Re: [Intel-wired-lan] [next PATCH S82 9/9] i40e: Suppress compilation warning on kernels older than 3.12
> 
> On 11/3/2017 4:05 AM, Alice Michael wrote:
>> From: Paweł Jabłoński <pawel.jablonski@intel.com>
>>
>> In kernels before 3.12 the second parameter in netif_set_xps_queue
>> function has no const qualifier. It is generating warning in older
>> kernels. get_cpu_mask function always returns a pointer with const
>> qualifier. Adding the cast is enough to remove compilation warning.
>>
>> Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>
>> ---
>>    drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> index 8657ef6..1fe8099 100644
>> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> @@ -3062,8 +3062,7 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
>>    		return;
>>    
>>    	cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
>> -	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
>> -			    ring->queue_index);
>> +	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
>> +ring->queue_index);
> 
> I see no actual code change here, no cast as advertised.
> sln
> 
>>    }
>>    
>>    /**
>>
> --------------------------------------------------------------------
> 
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
> 
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
> przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
> others is strictly prohibited.
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 8657ef6..1fe8099 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3062,8 +3062,7 @@  static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
 		return;
 
 	cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
-	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
-			    ring->queue_index);
+	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu), ring->queue_index);
 }
 
 /**