mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: octeon: ethernet: removed unneeded parentheses
@ 2026-07-21 16:04 Faisal Mukhtar
  2026-07-28  7:32 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Faisal Mukhtar @ 2026-07-21 16:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Eric Wu, Ayush Mukkanwar, linux-staging, linux-kernel, Faisal Mukhtar

removed redundant inner parentheses around "interface < 2"
in 3 if statement instances within the file ethernet.c,
got the warning by running checkpatch.pl script on the file.

Signed-off-by: Faisal Mukhtar <mukhtarfaisal03@gmail.com>
---
 drivers/staging/octeon/ethernet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index f3fa221f452e..5083d9596972 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -247,7 +247,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);
@@ -293,7 +293,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;
@@ -345,7 +345,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.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: staging: octeon: ethernet: removed unneeded parentheses
  2026-07-21 16:04 [PATCH] drivers: staging: octeon: ethernet: removed unneeded parentheses Faisal Mukhtar
@ 2026-07-28  7:32 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-28  7:32 UTC (permalink / raw)
  To: Faisal Mukhtar; +Cc: Eric Wu, Ayush Mukkanwar, linux-staging, linux-kernel

On Tue, Jul 21, 2026 at 09:04:17PM +0500, Faisal Mukhtar wrote:
> removed redundant inner parentheses around "interface < 2"
> in 3 if statement instances within the file ethernet.c,
> got the warning by running checkpatch.pl script on the file.
> 
> Signed-off-by: Faisal Mukhtar <mukhtarfaisal03@gmail.com>
> ---
>  drivers/staging/octeon/ethernet.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index f3fa221f452e..5083d9596972 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -247,7 +247,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 &&

checkpatch should not have warned you about this, as it is correct.  Be
sure to use the latest version.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-28  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21 16:04 [PATCH] drivers: staging: octeon: ethernet: removed unneeded parentheses Faisal Mukhtar
2026-07-28  7:32 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®