diff options
| author | Christophe JAILLET <[email protected]> | 2022-06-26 16:27:45 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-06-28 05:14:09 +0000 |
| commit | 7c2c57263af41cfd8b5022274e6801542831bb69 (patch) | |
| tree | e4e927d1a9ea9041147a86f065a914551170d0d0 /net/unix/sysctl_net_unix.c | |
| parent | Merge branch 'nfp-add-vepa-and-adapter-selftest-support' (diff) | |
| download | kernel-7c2c57263af41cfd8b5022274e6801542831bb69.tar.gz kernel-7c2c57263af41cfd8b5022274e6801542831bb69.zip | |
hinic: Use the bitmap API when applicable
'vlan_bitmap' is a bitmap and is used as such. So allocate it with
devm_bitmap_zalloc() and its explicit bit size (i.e. VLAN_N_VID).
This avoids the need of the VLAN_BITMAP_SIZE macro which:
- needlessly has a 'nic_dev' parameter
- should be "long" (and not byte) aligned, so that the bitmap semantic
is respected
This is in fact not an issue because VLAN_N_VID is 4096 at the time
being, but devm_bitmap_zalloc() is less verbose and easier to understand.
Signed-off-by: Christophe JAILLET <[email protected]>
Link: https://lore.kernel.org/r/6ff7b7d21414240794a77dc2456914412718a145.1656260842.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions
