Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: bcm_sf2: Initialize __be16 with a __be16 value

A __be16 variable should be initialised with a __be16 value. So add a
htons(). In this case it is pointless, given the value being assigned
is 0xffff, but it stops sparse from warnings.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Andrew Lunn and committed by
David S. Miller
f76b6ef1 8caefe7e

+2 -2
+2 -2
drivers/net/dsa/bcm_sf2_cfp.c
··· 348 348 unsigned int queue_num, 349 349 struct ethtool_rx_flow_spec *fs) 350 350 { 351 + __be16 vlan_tci = 0, vlan_m_tci = htons(0xffff); 351 352 struct ethtool_rx_flow_spec_input input = {}; 352 - __be16 vlan_tci = 0 , vlan_m_tci = 0xffff; 353 353 const struct cfp_udf_layout *layout; 354 354 unsigned int slice_num, rule_index; 355 355 struct ethtool_rx_flow_rule *flow; ··· 629 629 unsigned int queue_num, 630 630 struct ethtool_rx_flow_spec *fs) 631 631 { 632 + __be16 vlan_tci = 0, vlan_m_tci = htons(0xffff); 632 633 struct ethtool_rx_flow_spec_input input = {}; 633 - __be16 vlan_tci = 0, vlan_m_tci = 0xffff; 634 634 unsigned int slice_num, rule_index[2]; 635 635 const struct cfp_udf_layout *layout; 636 636 struct ethtool_rx_flow_rule *flow;