All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: Remove unnecessary parentheses
@ 2023-10-29 18:54 Dorine Tipo
  2023-10-30 12:06 ` Bagas Sanjaya
  0 siblings, 1 reply; 4+ messages in thread
From: Dorine Tipo @ 2023-10-29 18:54 UTC (permalink / raw)
  To: outreachy, gregkh; +Cc: Dorine Tipo

- Remove the unnecessary parentheses around
'priv->imode == CVMX_HELPER_INTERFACE_MODE_RGMII'

The '==' operator has higher precedence than the '&&' and '||' operators.
Removing the unnecessary parentheses simplifies the code while maintaining
the correct order of operations, making it more readable.

Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com>
---
 drivers/staging/octeon/ethernet-rgmii.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c
index 0c4fac31540a..15d2c84925ba 100644
--- a/drivers/staging/octeon/ethernet-rgmii.c
+++ b/drivers/staging/octeon/ethernet-rgmii.c
@@ -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);
 		}
-- 
2.25.1


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

end of thread, other threads:[~2023-10-30 13:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-29 18:54 [PATCH] staging: Remove unnecessary parentheses Dorine Tipo
2023-10-30 12:06 ` Bagas Sanjaya
2023-10-30 12:40   ` Greg KH
2023-10-30 13:30     ` Bagas Sanjaya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.