]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4: Use cpumask_available for eq->affinity_mask
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 21 Sep 2018 09:44:12 +0000 (02:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Sep 2018 02:20:22 +0000 (19:20 -0700)
commit432b5c3a73bd3e6c87bb999ad37f58146d15d043
treee05847c13593dbc8e1edad3e19d2890dd7e684f3
parentb7bb4dacb5506371ae3459d30241bd6bc15ff2e8
net/mlx4: Use cpumask_available for eq->affinity_mask

Clang warns that the address of a pointer will always evaluated as true
in a boolean context:

drivers/net/ethernet/mellanox/mlx4/eq.c:243:11: warning: address of
array 'eq->affinity_mask' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (!eq->affinity_mask || cpumask_empty(eq->affinity_mask))
            ~~~~~^~~~~~~~~~~~~
1 warning generated.

Use cpumask_available, introduced in commit 7579f3fe4250 ("cpumask: Add
helper cpumask_available()"), which does the proper checking and avoids
this warning.

Link: https://github.com/ClangBuiltLinux/linux/issues/86
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/eq.c