outreachy.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Dorine Tipo <dorine.a.tipo@gmail.com>
Cc: outreachy@lists.linux.dev, gregkh@linuxfoundation.org
Subject: Re: [PATCH] staging: octeon: remove unnecessary parentheses
Date: Sun, 29 Oct 2023 17:53:52 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2310291750280.3136@hadrien> (raw)
In-Reply-To: <20231029162453.7437-1-dorine.a.tipo@gmail.com>

This patch is working on the same code as the previous one, but there is
no indication that it is anything other than the first version.

On Sun, 29 Oct 2023, Dorine Tipo wrote:

> 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.
>
> - Remove unnecessary parentheses around 'interface < 2'.
>
> Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com>
>
> ---
> Removing the parentheses around interface < 2 improves readability without
> changing the order of evaluation of the logic because the < operator has
> a higher precedence than the && operator.

This is quite backwards.  Above the line you should provide all of the
information that will be useful to people in the future, and thus should
be recorded in the git tree.

Below the line, you should indicate what has changed since the previous
version.  This should contain the entire history of the evolution of the
patch, as illustrated in the Revising your patches section of the furst
patch tutorial.

julia

>  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 8e1f4b987a25..349308edbc9e 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -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
>
>

  reply	other threads:[~2023-10-29 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 16:24 [PATCH] staging: octeon: remove unnecessary parentheses Dorine Tipo
2023-10-29 16:53 ` Julia Lawall [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-29 16:35 Dorine Tipo
2023-10-29 17:15 ` Julia Lawall
2023-10-29 16:01 Dorine Tipo
2023-10-29 16:30 ` Julia Lawall
2017-09-14 16:51 [PATCH] Staging: octeon: Remove " Meghana Madhyastha

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=alpine.DEB.2.22.394.2310291750280.3136@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=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).