Linux kernel staging patches
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Abhinav Srivastava <atg271@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: octeon: ethernet: remove redundant parentheses in conditionals
Date: Tue, 7 Jul 2026 11:25:14 +0200	[thread overview]
Message-ID: <2026070722-trash-boogieman-292f@gregkh> (raw)
In-Reply-To: <20260702203557.59238-1-atg271@gmail.com>

On Thu, Jul 02, 2026 at 01:35:57PM -0700, Abhinav Srivastava wrote:
> Remove extra parentheses in 3 multiline if conditions and align
> continuation lines under opening parenthesis. No functional change
> intended.
> 
> Signed-off-by: Abhinav Srivastava <atg271@gmail.com>
> ---
>  drivers/staging/octeon/ethernet.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index f3fa221f4..e28625b47 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -247,9 +247,9 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
>  
>  	dev->mtu = new_mtu;
>  
> -	if ((interface < 2) &&
> -	    (cvmx_helper_interface_get_mode(interface) !=
> -		CVMX_HELPER_INTERFACE_MODE_SPI)) {
> +	if (interface < 2 &&
> +	    cvmx_helper_interface_get_mode(interface) !=
> +	    CVMX_HELPER_INTERFACE_MODE_SPI) {

You changed the indentation :(

Also, now we have to remember what the precidence order is, which is a
pain.  We write code for people first, compilers second, and this code
is the same either way for the compiler, so leave it alone to make it
easier for people to understand it.

thanks,

greg k-h

      reply	other threads:[~2026-07-07  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 20:35 [PATCH] staging: octeon: ethernet: remove redundant parentheses in conditionals Abhinav Srivastava
2026-07-07  9:25 ` Greg KH [this message]

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=2026070722-trash-boogieman-292f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=atg271@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@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