All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ayush Singh" <ayush@beagleboard.org>
Cc: ojeda@kernel.org, conor+dt@kernel.org, robh@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 3/7] rust: crc_ccitt: add CRC-CCITT abstraction
Date: Thu, 20 Aug 2026 09:33:33 +0000	[thread overview]
Message-ID: <20260820093334.08D201F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260820-gb-uart-transport-v1-3-282da14ab7b7@beagleboard.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing import for `bindings` in `crc_ccitt.rs`, leading to a compilation failure when `CONFIG_RUST_CRC_CCITT_ABSTRACTIONS=y`.
--

--- Patch [3]: [PATCH 3/7] rust: crc_ccitt: add CRC-CCITT abstraction ---
commit 07276b496fabcc3fbd341c5cd0116734faf9ec26
Author: Ayush Singh <ayush@beagleboard.org>

rust: crc_ccitt: add CRC-CCITT abstraction

This commit adds a Rust abstraction for the CRC-CCITT library functions. The
module is gated behind the new CONFIG_RUST_CRC_CCITT_ABSTRACTIONS Kconfig
symbol so the C library is only built when required by a Rust user.

> diff --git a/rust/kernel/crc_ccitt.rs b/rust/kernel/crc_ccitt.rs
> new file mode 100644
> index 0000000000000..6042ada16967d
> --- /dev/null
> +++ b/rust/kernel/crc_ccitt.rs
[ ... ]
> +#[inline]
> +pub fn crc_ccitt(crc: u16, data: &[u8]) -> u16 {
> +    // SAFETY: `data.as_ptr()` is valid for reads of `data.len()` bytes for the
> +    // duration of the call, since it is derived from a live shared slice.
> +    unsafe { bindings::crc_ccitt(crc, data.as_ptr(), data.len()) }

[Severity: Low]
Does this code fail to compile when CONFIG_RUST_CRC_CCITT_ABSTRACTIONS=y?
It looks like the bindings module is not imported in this file, which
would cause a build failure when resolving bindings::crc_ccitt here.

> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260820-gb-uart-transport-v1-0-282da14ab7b7@beagleboard.org?part=3

  reply	other threads:[~2026-08-20  9:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  9:25 [PATCH 0/7] Add Greybus Sotfsvc and UART Node drivers Ayush Singh
2026-08-20  9:25 ` [PATCH 1/7] greybus: connection: Export gb_connection_get() and gb_connection_put() Ayush Singh
2026-08-20  9:41   ` sashiko-bot
2026-08-20  9:25 ` [PATCH 2/7] greybus: connection: Add gb_connection_hd_find_by_intf() Ayush Singh
2026-08-20  9:32   ` sashiko-bot
2026-08-20  9:25 ` [PATCH 3/7] rust: crc_ccitt: add CRC-CCITT abstraction Ayush Singh
2026-08-20  9:33   ` sashiko-bot [this message]
2026-08-20  9:25 ` [PATCH 4/7] rust: kernel: Add greybus abstractions Ayush Singh
2026-08-20  9:42   ` sashiko-bot
2026-08-20  9:25 ` [PATCH 5/7] drivers: greybus: Add software SVC implementation Ayush Singh
2026-08-20  9:40   ` sashiko-bot
2026-08-20  9:25 ` [PATCH 6/7] greybus: Add Rust UART node driver Ayush Singh
2026-08-20  9:38   ` sashiko-bot
2026-08-20  9:25 ` [PATCH 7/7] dt-bindings: beagle: Add BeagleConnect Freedom Ayush Singh
2026-08-20  9:31   ` sashiko-bot
2026-08-20 18:33   ` Conor Dooley

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=20260820093334.08D201F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ayush@beagleboard.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@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 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.