net: mscc: ocelot: use plain int when interacting with TCAM tables
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 20 Jun 2020 15:43:37 +0000 (18:43 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2020 00:25:23 +0000 (17:25 -0700)
commit7eb5c96a7cae01f500b584d21f6db3abf1aad33e
treed7c0b42ee0cf9bf9f5ffd8fd86b081dd29747a7f
parent3ab4ceb6e9639e4e42d473e46ae7976c24187876
net: mscc: ocelot: use plain int when interacting with TCAM tables

sparse is rightfully complaining about the fact that:

warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
   26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
      |                            ^
note: in expansion of macro ‘GENMASK_INPUT_CHECK’
   39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |   ^~~~~~~~~~~~~~~~~~~
note: in expansion of macro ‘GENMASK’
  127 |   mask = GENMASK(width, 0);
      |          ^~~~~~~

So replace the variables that go into GENMASK with plain, signed integer
types.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_ace.c