From: "Yacin Belmihoub-Martel" <yacin.belmihoub-martel@silabs.com>
To: "Damien Riégel" <damien.riegel@silabs.com>, greybus-dev@lists.linaro.org
Cc: <linux-kernel@vger.kernel.org>, "Johan Hovold" <johan@kernel.org>,
"Alex Elder" <elder@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Silicon Labs Kernel Team" <linux-devel@silabs.com>
Subject: Re: [PATCH 11/14] greybus: cpc: honour remote's RX window
Date: Fri, 12 Dec 2025 14:03:28 -0500 [thread overview]
Message-ID: <DEWGZIX9YR7M.2IINU7JMVO1XS@silabs.com> (raw)
In-Reply-To: <20251212161308.25678-12-damien.riegel@silabs.com>
On Fri Dec 12, 2025 at 11:13 AM EST, Damien Riégel wrote:
> +u8 cpc_header_get_frames_acked_count(u8 seq, u8 ack)
> +{
> + u8 frames_acked_count;
> +
> + /* Find number of frames acknowledged with ACK number. */
> + if (ack > seq) {
> + frames_acked_count = ack - seq;
> + } else {
> + frames_acked_count = 256 - seq;
> + frames_acked_count += ack;
> + }
> +
> + return frames_acked_count;
> +}
[nit]
As stated in the RFC, this can be simplified to `return ack - seq;`,
since both `ack`, `seq` and the return value are `u8`.
Thanks,
--
Yacin Belmihoub-Martel
Silicon Laboratories
next prev parent reply other threads:[~2025-12-12 19:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 16:12 [PATCH 00/14] greybus: introduce CPC as transport layer Damien Riégel
2025-12-12 16:12 ` [PATCH 01/14] greybus: cpc: add minimal CPC Host Device infrastructure Damien Riégel
2025-12-12 16:12 ` [PATCH 02/14] greybus: cpc: introduce CPC cport structure Damien Riégel
2025-12-12 16:12 ` [PATCH 03/14] greybus: cpc: use socket buffers instead of gb_message in TX path Damien Riégel
2025-12-12 16:12 ` [PATCH 04/14] greybus: cpc: pack cport ID in Greybus header Damien Riégel
2025-12-12 16:59 ` Yacin Belmihoub-Martel
2025-12-12 16:12 ` [PATCH 05/14] greybus: cpc: switch RX path to socket buffers Damien Riégel
2025-12-12 16:13 ` [PATCH 06/14] greybus: cpc: introduce CPC header structure Damien Riégel
2025-12-12 17:07 ` Yacin Belmihoub-Martel
2025-12-12 16:13 ` [PATCH 07/14] greybus: cpc: account for CPC header size in RX and TX path Damien Riégel
2025-12-12 16:13 ` [PATCH 08/14] greybus: cpc: add and validate sequence numbers Damien Riégel
2025-12-12 18:34 ` Yacin Belmihoub-Martel
2025-12-12 16:13 ` [PATCH 09/14] greybus: cpc: acknowledge all incoming messages Damien Riégel
2025-12-13 14:44 ` kernel test robot
2025-12-13 23:45 ` kernel test robot
2025-12-12 16:13 ` [PATCH 10/14] greybus: cpc: use holding queue instead of sending out immediately Damien Riégel
2025-12-12 16:13 ` [PATCH 11/14] greybus: cpc: honour remote's RX window Damien Riégel
2025-12-12 19:03 ` Yacin Belmihoub-Martel [this message]
2025-12-13 7:43 ` kernel test robot
2025-12-12 16:13 ` [PATCH 12/14] greybus: cpc: let host device drivers dequeue TX frames Damien Riégel
2025-12-12 16:13 ` [PATCH 13/14] greybus: cpc: add private data pointer in CPC Host Device Damien Riégel
2025-12-12 16:13 ` [PATCH 14/14] greybus: cpc: add CPC SDIO host driver Damien Riégel
2025-12-12 22:01 ` Yacin Belmihoub-Martel
2025-12-23 2:37 ` Damien Riégel
2025-12-13 9:02 ` kernel test robot
2025-12-13 19:40 ` kernel test robot
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=DEWGZIX9YR7M.2IINU7JMVO1XS@silabs.com \
--to=yacin.belmihoub-martel@silabs.com \
--cc=damien.riegel@silabs.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-devel@silabs.com \
--cc=linux-kernel@vger.kernel.org \
/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.