staging: octeon: remove unnecessary parentheses
PATCH v2 1/1 staging: octeon: remove unnecessary parentheses
- Remove unnecessary parentheses around 'interface < 2'.
Removing the parentheses around interface < 2 improves readability without changing the order of evaluation of the logic because the < operator has a higher precedence than the && operator.
Signed-off-by Dorine Tipo <[email protected]>
---
This patch addresses the unnecessary issue reported by checkpatch. The subject line has been revised to be more concise and less detailed, as suggested in the patch feedback.
drivers/staging/octeon/ethernet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
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.25.1