Linux CAN drivers development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: guoqi0226 <guoqi0226@163.com>
Cc: "Oleksij Rempel" <o.rempel@pengutronix.de>,
	"Vincent Mailhol" <mailhol@kernel.org>,
	"Marc Kleine-Budde" <mkl@pengutronix.de>,
	"Oliver Hartkopp" <socketcan@hartkopp.net>,
	linux-can@vger.kernel.org
Subject: Re: [PATCH 2/2] can: mcp251xfd: Add ACPI device ID table for MCP251XFD
Date: Tue, 16 Jun 2026 03:13:31 +0000	[thread overview]
Message-ID: <20260616031332.0F34C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260616030019.35845-2-guoqi0226@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The ACPI Hardware ID (HID) 'MCP251XFD' violates the ACPI specification format and length requirements.
--

commit 1d6ad13eeda40da0f75db78e76e1e476fdd6965b
Author: guoqi0226 <guoqi0226@163.com>

can: mcp251xfd: Add ACPI device ID table for MCP251XFD

This patch adds an ACPI match table for the MCP251XFD CAN controller to
enable driver binding on ACPI-enumerated SPI platforms.

> diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
> --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
> +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
[ ... ]
> @@ -2212,6 +2213,14 @@ static const struct spi_device_id mcp251xfd_id_table[] = {
>  };
>  MODULE_DEVICE_TABLE(spi, mcp251xfd_id_table);
>  
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id mcp251xfd_acpi_match[] = {
> +	{ "MCP251XFD", (kernel_ulong_t)&mcp251xfd_devtype_data_mcp251xfd},

[Severity: Low]
Does this ACPI Hardware ID violate the ACPI specification length and format
requirements?

According to the ACPI specification, a valid ACPI HID must be exactly 8
characters long (typically 4 uppercase letters followed by 4 hexadecimal
digits) or a 7-character PNP ID. The string "MCP251XFD" is 9 characters
long and does not end in hex digits.

Could this be avoided by using the generic "PRP0001" HID in the firmware
instead?

By providing the OF compatible string ("microchip,mcp251xfd") via the ACPI
_DSD table, the existing mcp251xfd_of_match table would handle the
enumeration without requiring any ACPI-specific driver changes.

> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, mcp251xfd_acpi_match);
> +#endif

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260616030019.35845-1-guoqi0226@163.com?part=2

  reply	other threads:[~2026-06-16  3:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  3:00 [PATCH 1/2] can: mcp251x: Add ACPI device ID table for MCP2515 guoqi0226
2026-06-16  3:00 ` [PATCH 2/2] can: mcp251xfd: Add ACPI device ID table for MCP251XFD guoqi0226
2026-06-16  3:13   ` sashiko-bot [this message]
2026-06-16  7:10 ` [PATCH 1/2] can: mcp251x: Add ACPI device ID table for MCP2515 Marc Kleine-Budde

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=20260616031332.0F34C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=guoqi0226@163.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=o.rempel@pengutronix.de \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=socketcan@hartkopp.net \
    /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