staging: octeon: remove unnecessary parentheses
PATCH 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.
---
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
Quoted 6 lines · Dorine Tipo
- 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.
Quoted 6 lines
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.
There is still the case that this patch is a revision of a previous one, but there is no [PATCH v2] in the subject line. Theer have been a lot of versions of this patch, so I don't know which number this one would be, but at least if there were a v2, one would know that the v2 one is more recent than all of the others.
julia
Quoted 39 lines
drivers/staging/octeon/ethernet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/octeon/ethernet.c +3
-4@@ -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; --2.25.1