Re: [net-next 1/8] net/mlx5: Fixed static checker warnings

2017-02-01 Thread Or Gerlitz
On Wed, Feb 1, 2017 at 7:22 PM, David Miller wrote: [..] > You're propagating values into a u32 field, which you are explicitly > performing 32-bit endianness conversions upon. > Just use "u32" for a local variable and get rid of all of these casts. ok, will do that

Re: [net-next 1/8] net/mlx5: Fixed static checker warnings

2017-02-01 Thread David Miller
From: Saeed Mahameed Date: Tue, 31 Jan 2017 22:58:36 +0200 > @@ -487,11 +487,11 @@ static int __parse_cls_flower(struct mlx5e_priv *priv, > MLX5_SET(fte_match_set_lyr_2_4, headers_c, cvlan_tag, > 1); >

RE: [net-next 1/8] net/mlx5: Fixed static checker warnings

2017-02-01 Thread David Laight
From: Or Gerlitz > Sent: 01 February 2017 16:40 > On Wed, Feb 1, 2017 at 1:17 PM, David Laight wrote: > > From: Saeed Mahameed > >> Sent: 31 January 2017 20:59 > >> From: Or Gerlitz > >> > >> For some reason, sparse doesn't like using an expression

Re: [net-next 1/8] net/mlx5: Fixed static checker warnings

2017-02-01 Thread Or Gerlitz
On Wed, Feb 1, 2017 at 1:17 PM, David Laight wrote: > From: Saeed Mahameed >> Sent: 31 January 2017 20:59 >> From: Or Gerlitz >> >> For some reason, sparse doesn't like using an expression of type (!x) >> with a bitwise | and &. In order to

RE: [net-next 1/8] net/mlx5: Fixed static checker warnings

2017-02-01 Thread David Laight
From: Saeed Mahameed > Sent: 31 January 2017 20:59 > From: Or Gerlitz > > For some reason, sparse doesn't like using an expression of type (!x) > with a bitwise | and &. In order to mitigate that, we use a local > variable. > > Since getting a typeof(bitfield) is

[net-next 1/8] net/mlx5: Fixed static checker warnings

2017-01-31 Thread Saeed Mahameed
From: Or Gerlitz For some reason, sparse doesn't like using an expression of type (!x) with a bitwise | and &. In order to mitigate that, we use a local variable. Since getting a typeof(bitfield) is incorrect, we cast such cases. This removes the following sparse