]> git.baikalelectronics.ru Git - kernel.git/commit
cnic: tidy up a size calculation
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 28 Jun 2018 09:31:25 +0000 (12:31 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 09:46:52 +0000 (18:46 +0900)
commit6e0e7e790d1b67284b2b348c33e03d37c62030e5
tree0c0da461ae41fa5c560b883cc20ae6cfde5b72cd
parent9b90aedfd4721000db909a5762a8133c95ce6ec8
cnic: tidy up a size calculation

Static checkers complain that id_tbl->table points to longs and 4 bytes
is smaller than sizeof(long).  But the since other side is dividing by
32 instead of sizeof(long), that means the current code works fine.

Anyway, it's more conventional to use the BITS_TO_LONGS() macro when
we're allocating a bitmap.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/cnic.c