ethtool: Remove unnecessary null check in ethtool_rx_flow_rule_create
net/core/ethtool.c:3023:19: warning: address of array
'ext_m_spec->h_dest' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (ext_m_spec->h_dest) {
~~ ~~~~~~~~~~~~^~~~~~
h_dest is an array, it can't be null so remove this check.
Fixes: eca4205f9e ("ethtool: add ethtool_rx_flow_spec to flow_rule structure translator")
Link: https://github.com/ClangBuiltLinux/linux/issues/353
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
439bb9edd4
commit
8b34ec65b3
@@ -3020,7 +3020,6 @@ ethtool_rx_flow_rule_create(const struct ethtool_rx_flow_spec_input *input)
|
||||
const struct ethtool_flow_ext *ext_h_spec = &fs->h_ext;
|
||||
const struct ethtool_flow_ext *ext_m_spec = &fs->m_ext;
|
||||
|
||||
if (ext_m_spec->h_dest) {
|
||||
memcpy(match->key.eth_addrs.dst, ext_h_spec->h_dest,
|
||||
ETH_ALEN);
|
||||
memcpy(match->mask.eth_addrs.dst, ext_m_spec->h_dest,
|
||||
@@ -3031,7 +3030,6 @@ ethtool_rx_flow_rule_create(const struct ethtool_rx_flow_spec_input *input)
|
||||
match->dissector.offset[FLOW_DISSECTOR_KEY_ETH_ADDRS] =
|
||||
offsetof(struct ethtool_rx_flow_key, eth_addrs);
|
||||
}
|
||||
}
|
||||
|
||||
act = &flow->rule->action.entries[0];
|
||||
switch (fs->ring_cookie) {
|
||||
|
||||
Reference in New Issue
Block a user