From: Simon Horman <horms@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: intel-wired-lan@lists.osuosl.org, llvm@lists.linux.dev,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Nathan Chancellor <nathan@kernel.org>,
Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org, Tony Nguyen <anthony.l.nguyen@intel.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] i40e: Avoid unnecessary use of comma operator
Date: Tue, 19 Dec 2023 10:05:23 +0000 [thread overview]
Message-ID: <20231219100523.GD811967@kernel.org> (raw)
In-Reply-To: <CAKwvOd=ZKV6KsgX0UxBX4Y89YEgpry00jG6K6qSjodwY3DLAzA@mail.gmail.com>
On Mon, Dec 18, 2023 at 08:32:28AM -0800, Nick Desaulniers wrote:
> On Sun, Dec 17, 2023 at 1:45 AM Simon Horman <horms@kernel.org> wrote:
> >
> > Although it does not seem to have any untoward side-effects,
> > the use of ';' to separate to assignments seems more appropriate than ','.
> >
> > Flagged by clang-17 -Wcomma
>
> Yikes! This kind of example is why I hate the comma operator!
>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> (Is -Wcomma enabled by -Wall?)
>
> Is there a fixes tag we can add?
Hi Nick,
I don't believe this resolves a user-visible bug,
so for Networking code a fixes tag isn't appropriate.
>
> >
> > No functional change intended.
> > Compile tested only.
> >
> > Signed-off-by: Simon Horman <horms@kernel.org>
> > ---
> > drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> > index 812d04747bd0..f542f2671957 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> > @@ -1917,7 +1917,7 @@ int i40e_get_eeprom(struct net_device *netdev,
> > len = eeprom->len - (I40E_NVM_SECTOR_SIZE * i);
> > last = true;
> > }
> > - offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i),
> > + offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i);
> > ret_val = i40e_aq_read_nvm(hw, 0x0, offset, len,
> > (u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i),
> > last, NULL);
> >
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Nathan Chancellor <nathan@kernel.org>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH iwl-next] i40e: Avoid unnecessary use of comma operator
Date: Tue, 19 Dec 2023 10:05:23 +0000 [thread overview]
Message-ID: <20231219100523.GD811967@kernel.org> (raw)
In-Reply-To: <CAKwvOd=ZKV6KsgX0UxBX4Y89YEgpry00jG6K6qSjodwY3DLAzA@mail.gmail.com>
On Mon, Dec 18, 2023 at 08:32:28AM -0800, Nick Desaulniers wrote:
> On Sun, Dec 17, 2023 at 1:45 AM Simon Horman <horms@kernel.org> wrote:
> >
> > Although it does not seem to have any untoward side-effects,
> > the use of ';' to separate to assignments seems more appropriate than ','.
> >
> > Flagged by clang-17 -Wcomma
>
> Yikes! This kind of example is why I hate the comma operator!
>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> (Is -Wcomma enabled by -Wall?)
>
> Is there a fixes tag we can add?
Hi Nick,
I don't believe this resolves a user-visible bug,
so for Networking code a fixes tag isn't appropriate.
>
> >
> > No functional change intended.
> > Compile tested only.
> >
> > Signed-off-by: Simon Horman <horms@kernel.org>
> > ---
> > drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> > index 812d04747bd0..f542f2671957 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> > @@ -1917,7 +1917,7 @@ int i40e_get_eeprom(struct net_device *netdev,
> > len = eeprom->len - (I40E_NVM_SECTOR_SIZE * i);
> > last = true;
> > }
> > - offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i),
> > + offset = eeprom->offset + (I40E_NVM_SECTOR_SIZE * i);
> > ret_val = i40e_aq_read_nvm(hw, 0x0, offset, len,
> > (u8 *)eeprom_buff + (I40E_NVM_SECTOR_SIZE * i),
> > last, NULL);
> >
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
next prev parent reply other threads:[~2023-12-19 10:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-17 9:44 [Intel-wired-lan] [PATCH iwl-next] i40e: Avoid unnecessary use of comma operator Simon Horman
2023-12-17 9:44 ` Simon Horman
2023-12-18 16:32 ` [Intel-wired-lan] " Nick Desaulniers
2023-12-18 16:32 ` Nick Desaulniers
2023-12-18 19:00 ` [Intel-wired-lan] " Nathan Chancellor
2023-12-18 19:00 ` Nathan Chancellor
2023-12-18 19:08 ` [Intel-wired-lan] " Nick Desaulniers
2023-12-18 19:08 ` Nick Desaulniers
2023-12-19 10:12 ` [Intel-wired-lan] " Simon Horman
2023-12-19 10:12 ` Simon Horman
2023-12-19 16:24 ` [Intel-wired-lan] " Nick Desaulniers
2023-12-19 16:24 ` Nick Desaulniers
2023-12-19 10:05 ` Simon Horman [this message]
2023-12-19 10:05 ` Simon Horman
2023-12-27 14:13 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-12-27 14:13 ` Pucha, HimasekharX Reddy
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=20231219100523.GD811967@kernel.org \
--to=horms@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=justinstitt@google.com \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 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.