From: Dorine Tipo <dorine.a.tipo@gmail.com>
To: outreachy@lists.linux.dev, gregkh@linuxfoundation.org
Cc: Dorine Tipo <dorine.a.tipo@gmail.com>
Subject: [PATCH] staging: Remove unnecessary parentheses
Date: Sun, 29 Oct 2023 18:54:05 +0000 [thread overview]
Message-ID: <20231029185405.11073-1-dorine.a.tipo@gmail.com> (raw)
- 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
next reply other threads:[~2023-10-30 3:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-29 18:54 Dorine Tipo [this message]
2023-10-30 12:06 ` [PATCH] staging: Remove unnecessary parentheses Bagas Sanjaya
2023-10-30 12:40 ` Greg KH
2023-10-30 13:30 ` Bagas Sanjaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231029185405.11073-1-dorine.a.tipo@gmail.com \
--to=dorine.a.tipo@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=outreachy@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).