netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Alan Brady <alan.brady@intel.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
	<willemdebruijn.kernel@gmail.com>, <przemyslaw.kitszel@intel.com>,
	<igor.bagnucki@intel.com>, <aleksander.lobakin@intel.com>
Subject: Re: [PATCH v4 00/10 iwl-next] idpf: refactor virtchnl messages
Date: Tue, 6 Feb 2024 12:03:03 -0800	[thread overview]
Message-ID: <20240206120303.0fd22238@kernel.org> (raw)
In-Reply-To: <d93d8608-be23-401a-b163-da7ce4dc476f@intel.com>

On Tue, 6 Feb 2024 11:18:48 -0800 Alan Brady wrote:
> We did run coccinelle check and see the min suggestions. It's triggering 
> on these statements I added:
> 
> return reply_sz < 0 ? reply_sz : 0;
> 
> A min here would change it to:
> 
> return min(reply_sz, 0);
> 
> I didn't really like that because it's misleading as though we're 
> returning the size of the reply and might accidentally encourage someone 
> to change it to a max. Here reply_sz will be negative if an error was 
> returned from message sending. But this function we only want to return 
> 0 or negative. By being explicit in what we want to do, it seems clearer 
> to me what the intention is but I could be wrong.
> 
> We can definitely change it however if that's preferred here.

Hm, okay, that does sound like making it worse.
I'll disable the minmax coccicheck for now, it seems noisy.

  reply	other threads:[~2024-02-06 20:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  3:37 [PATCH v4 00/10 iwl-next] idpf: refactor virtchnl messages Alan Brady
2024-02-06  3:37 ` [PATCH v4 01/10 iwl-next] idpf: implement virtchnl transaction manager Alan Brady
2024-02-20 14:30   ` Alexander Lobakin
2024-02-20 16:23     ` Alan Brady
2024-02-06  3:37 ` [PATCH v4 02/10 iwl-next] idpf: refactor vport virtchnl messages Alan Brady
2024-02-06  3:37 ` [PATCH v4 03/10 iwl-next] idpf: refactor queue related " Alan Brady
2024-02-06  3:37 ` [PATCH v4 04/10 iwl-next] idpf: refactor remaining " Alan Brady
2024-02-06  3:37 ` [PATCH v4 05/10 iwl-next] idpf: add async_handler for MAC filter messages Alan Brady
2024-02-06  3:38 ` [PATCH v4 06/10 iwl-next] idpf: refactor idpf_recv_mb_msg Alan Brady
2024-02-06  3:38 ` [PATCH v4 07/10 iwl-next] idpf: cleanup virtchnl cruft Alan Brady
2024-02-06  3:38 ` [PATCH v4 08/10 iwl-next] idpf: prevent deinit uninitialized virtchnl core Alan Brady
2024-02-06  3:38 ` [PATCH v4 09/10 iwl-next] idpf: fix minor controlq issues Alan Brady
2024-02-06  3:38 ` [PATCH v4 10/10 iwl-next] idpf: remove dealloc vector msg err in idpf_intr_rel Alan Brady
2024-02-06 17:02 ` [PATCH v4 00/10 iwl-next] idpf: refactor virtchnl messages Alexander Lobakin
2024-02-14 14:49   ` Alexander Lobakin
2024-02-14 17:06     ` Alan Brady
2024-02-20 13:47     ` [Intel-wired-lan] " Alexander Lobakin
2024-02-06 18:57 ` Jakub Kicinski
2024-02-06 19:18   ` Alan Brady
2024-02-06 20:03     ` Jakub Kicinski [this message]
2024-02-06 22:50       ` Keller, Jacob E
2024-02-06 23:17         ` Jakub Kicinski

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=20240206120303.0fd22238@kernel.org \
    --to=kuba@kernel.org \
    --cc=alan.brady@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=igor.bagnucki@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=willemdebruijn.kernel@gmail.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 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 NNTP newsgroup(s).