staging: octeon: remove unnecessary parentheses
PATCH 1/1 staging: octeon: remove unnecessary parentheses
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.
Changes made:
- Removed unnecessary parentheses around 'interface < 2'.
The parentheses around interface < 2 are not necessary because the < operator has a higher precedence than the && operator. In this context, removing these parentheses doesn't change the order of evaluation or the logic of the code and improves readability
--- 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 3 lines · Dorine Tipo
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.
This revision information is supposed to be underneath the ---. It will be meaningless to anyone who looks at this patch in the future, because they won't be seeing the old versions.
Since this is not the first version of this patch, there should be v2 v3 or v4 etc in the subject line after the word PATCH. Please see the first patch tutorial in the section Revising your patches
Quoted 2 lines
Changes made:
Drop this.
Quoted 1 line
- Removed unnecessary parentheses around 'interface < 2'.
Removed -> Remove
Quoted 4 lines
The parentheses around interface < 2 are not necessary because the < operator has a higher precedence than the && operator. In this context, removing these parentheses doesn't change the order of evaluation or the logic of the code and improves readability
This is a fine explanation, although a bit verbose. Try to express the whole thing in 1 or 2 sentences.
julia
Quoted 40 lines
Signed-off-by Dorine Tipo <[email protected]>--- 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