staging: octeon: Remove unnecessary parentheses
PATCH 1/1 staging: octeon: Remove unnecessary parentheses
Remove unnecessary parentheses found by checkpatch.
Signed-off-by Cyrus Ramavarapu <[email protected]>
--- drivers/staging/octeon/ethernet-rgmii.c | 2 +- drivers/staging/octeon/ethernet-rx.c | 5 ++--- drivers/staging/octeon/ethernet-tx.c | 8 ++++---- drivers/staging/octeon/ethernet.c | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-)
drivers/staging/octeon/ethernet-rgmii.c +1 -1
@@ -148,7 +148,7 @@ int cvm_oct_rgmii_open(struct net_device *dev)*/ if ((priv->imode ==CVMX_HELPER_INTERFACE_MODE_GMII && priv->port ==0 ) || - (priv->imode ==CVMX_HELPER_INTERFACE_MODE_RGMII )) { + priv->imode ==CVMX_HELPER_INTERFACE_MODE_RGMII ) { priv->poll = cvm_oct_check_preamble_errors;cvm_oct_check_preamble_errors (dev); }
drivers/staging/octeon/ethernet-rx.c +2 -3
@@ -69,7 +69,7 @@ static inline int cvm_oct_check_rcv_error(struct cvmx_wqe *work)else port = work->word1.cn38xx.ipprt; -if ((work->word2.snoip.err_code ==10 ) && (work->word1.len <=64 )) +if (work->word2.snoip.err_code ==10 && work->word1.len <=64 )/* * Ignore length errors on min size packets. Some * equipment incorrectly pads packets to 64+4FCS
@@ -324,8 +324,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget) } packet_not_copied =0 ; } -if (likely ((port <TOTAL_NUMBER_OF_PORTS ) && - cvm_oct_device[port])) { +if (likely (port <TOTAL_NUMBER_OF_PORTS && cvm_oct_device[port])) {struct net_device *dev = cvm_oct_device[port];/*
drivers/staging/octeon/ethernet-tx.c +4 -4
@@ -153,8 +153,8 @@ netdev_tx_t cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)* completely remove "qos" in the event neither interface * supports multiple queues per port. */ -if ((CVMX_PKO_QUEUES_PER_PORT_INTERFACE0 >1 ) || - (CVMX_PKO_QUEUES_PER_PORT_INTERFACE1 >1 )) { +if (CVMX_PKO_QUEUES_PER_PORT_INTERFACE0 >1 || +CVMX_PKO_QUEUES_PER_PORT_INTERFACE1 >1 ) { qos =GET_SKBUFF_QOS (skb);if (qos <=0 ) qos =0 ;
@@ -224,7 +224,7 @@ netdev_tx_t cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)* no room to add the padding. The kernel should always give * us at least a cache line */ -if ((skb->len <64 ) &&OCTEON_IS_MODEL (OCTEON_CN3XXX )) { +if (skb->len <64 &&OCTEON_IS_MODEL (OCTEON_CN3XXX )) {union cvmx_gmxx_prtx_cfg gmx_prt_cfg;int interface =INTERFACE (priv->port);int index =INDEX (priv->port);
@@ -360,7 +360,7 @@ netdev_tx_t cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev) dont_put_skbuff_in_hw:/* Check if we can use the hardware checksumming */ - if ((skb->protocol == htons(ETH_P_IP)) && + if (skb->protocol == htons(ETH_P_IP) && (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) && ((ip_hdr(skb)->frag_off == 0) ||
drivers/staging/octeon/ethernet.c +3 -3
@@ -248,7 +248,7 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu) dev->mtu = new_mtu; -if ((interface <2 ) && +if (interface <2 && (cvmx_helper_interface_get_mode (interface) !=CVMX_HELPER_INTERFACE_MODE_SPI )) {int index =INDEX (priv->port);
@@ -294,7 +294,7 @@ static void cvm_oct_common_set_multicast_list(struct net_device *dev)struct octeon_ethernet *priv =netdev_priv (dev);int interface =INTERFACE (priv->port); -if ((interface <2 ) && +if (interface <2 && (cvmx_helper_interface_get_mode (interface) !=CVMX_HELPER_INTERFACE_MODE_SPI )) {union cvmx_gmxx_rxx_adr_ctl control;
@@ -346,7 +346,7 @@ static int cvm_oct_set_mac_filter(struct net_device *dev)union cvmx_gmxx_prtx_cfg gmx_cfg;int interface =INTERFACE (priv->port); -if ((interface <2 ) && +if (interface <2 && (cvmx_helper_interface_get_mode (interface) !=CVMX_HELPER_INTERFACE_MODE_SPI )) {int i;
Signature · 1 line
2.41.0
Greg KH
maintainerQuoted 1 line · Cyrus Ramavarapu
Remove unnecessary parentheses found by checkpatch.
Please no, don't do this, see the email archives of this list for why I don't like this type of change (it forces you do have to remember rules when looking at the code in the future.)
I wish checkpatch would not report this type of issue anymore...
thanks,
greg k-h