[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB0277BE3@AcuExch.aculab.com>
Date: Wed, 1 Feb 2017 11:17:23 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Saeed Mahameed' <saeedm@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Or Gerlitz <ogerlitz@...lanox.com>,
Matan Barak <matanb@...lanox.com>
Subject: RE: [net-next 1/8] net/mlx5: Fixed static checker warnings
From: Saeed Mahameed
> Sent: 31 January 2017 20:59
> From: Or Gerlitz <ogerlitz@...lanox.com>
>
> 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.
...
> + MLX5_SET(fte_match_set_lyr_2_4, headers_c, first_prio, (u8)mask->vlan_priority);
Ugg nasty casts...
...
> #define MLX5_SET(typ, p, fld, v) do { \
> + typeof(v) _v = v; \
..
Why not just 'unsigned int _v = v;
David
Powered by blists - more mailing lists