Skip to content

Commit

Permalink
eth: mucse: rnp: remove extraneous parentheses around the comparison
Browse files Browse the repository at this point in the history
Fix follow error with clang-19:

drivers/net/ethernet/mucse/rnp/rnp_main.c:6165:24: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
 6165 |                 } else if ((protocol == htons(ETH_P_8021Q))) {
      |                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mucse/rnp/rnp_main.c:6165:24: note: remove extraneous parentheses around the comparison to silence this warning
 6165 |                 } else if ((protocol == htons(ETH_P_8021Q))) {
      |                            ~         ^                    ~
drivers/net/ethernet/mucse/rnp/rnp_main.c:6165:24: note: use '=' to turn this equality comparison into an assignment
 6165 |                 } else if ((protocol == htons(ETH_P_8021Q))) {
      |                                      ^~
      |                                      =
1 error generated.

Signed-off-by: WangYuli <[email protected]>
  • Loading branch information
Avenger-285714 committed Nov 22, 2024
1 parent 185c834 commit 36e1954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mucse/rnp/rnp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6162,7 +6162,7 @@ netdev_tx_t rnp_xmit_frame_ring(struct sk_buff *skb,
* protocol and store the tag
*/
/* veb only use ctags */
} else if ((protocol == htons(ETH_P_8021Q))) {
} else if (protocol == htons(ETH_P_8021Q)) {
struct vlan_hdr *vhdr, _vhdr;

vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr),
Expand Down

0 comments on commit 36e1954

Please sign in to comment.