From: sashiko-bot@kernel.org
To: "Liang Haowen" <nbg2974@gmail.com>
Cc: linux-scsi@vger.kernel.org, lee@kernel.org, linux-leds@vger.kernel.org
Subject: Re: [RFC v9 1/1] leds: asus-aura-scsi: Add ASUS Aura RGB LED driver for ROG NVMe enclosures
Date: Fri, 25 Sep 2026 13:52:51 +0000 [thread overview]
Message-ID: <20260925135251.9EE881F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260925134010.2815025-2-nbg2974@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Low] leds: asus-aura-scsi: undefined function kzalloc_obj() causes build failure
- [Low] leds: asus-aura-scsi: blk_rq_map_kern() missing required request_queue argument
- [Low] leds: asus-aura-scsi: strscpy() called with missing size argument
--
commit 4bfc2d1ddcebc584c1ac85ff43152c8925e0316d
Author: Liang Haowen <nbg2974@gmail.com>
leds: asus-aura-scsi: Add ASUS Aura RGB LED driver for ROG NVMe enclosures
This commit adds a new SCSI device handler and multicolour LED class driver
to support the ASUS Aura RGB LEDs present in ROG STRIX Arion external NVMe
enclosures. It sets up LED instances and maps hardware updates via vendor
SCSI commands over the block layer.
> diff --git a/drivers/leds/rgb/leds-asus-aura-scsi.c b/drivers/leds/rgb/leds-asus-aura-scsi.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/leds/rgb/leds-asus-aura-scsi.c
[ ... ]
> +static int ene_write_reg(struct asus_aura *aura, u16 reg,
> + const u8 *tx, u8 len)
> +{
> + struct scsi_device *sdev = aura->sdev;
> + struct request *rq;
[ ... ]
> + /*
> + * Stack memory is not DMA-safe (VMAP_STACK), so the payload is
> + * copied into the per-device buffer first.
> + */
> + memcpy(aura->tx, tx, len);
> + ret = blk_rq_map_kern(rq, aura->tx, len, GFP_NOIO);
[Severity: Low]
Does this code compile? The block layer API blk_rq_map_kern() requires 5
arguments, including the struct request_queue pointer as the first argument,
but only 4 are provided here.
[ ... ]
> +static int asus_aura_register_led(struct asus_aura *aura, int index)
> +{
> + struct asus_aura_led *led = &aura->leds[index];
> + struct led_classdev *cdev = &led->mc_cdev.led_cdev;
> + char hctl[32];
[ ... ]
> + /*
> + * The sdev's H:C:T:L keeps the names unique when more than one
> + * enclosure is connected; with a static name the LED core would
> + * register a second enclosure's LEDs under renamed nodes
> + * (asus-arion::led-0_1), the wrong device identity. The colons
> + * are flattened to dashes, the color section stays empty
> + * (multicolor, palette via multi_intensity) and the four
> + * identical zones take a "-N" ordinal, as
> + * Documentation/leds/leds-class.rst asks for.
> + */
> + strscpy(hctl, dev_name(&aura->sdev->sdev_gendev));
[Severity: Low]
Can strscpy() be called with only 2 arguments here? The function requires 3
arguments (destination, source, count), and a 2-argument macro wrapper does
not exist in this tree. This will result in a compilation error.
[ ... ]
> +static int asus_aura_attach(struct scsi_device *sdev)
> +{
> + struct asus_aura *aura;
> + int ret;
> +
> + if (strncmp(sdev->vendor, ARION_INQ_VENDOR, strlen(ARION_INQ_VENDOR)) ||
> + strncmp(sdev->model, ARION_INQ_MODEL, strlen(ARION_INQ_MODEL)))
> + return SCSI_DH_DEV_UNSUPP;
> +
> + aura = kzalloc_obj(*aura, GFP_KERNEL);
[Severity: Low]
Is kzalloc_obj() an intended API here? It appears to be an undefined
macro/function which results in an immediate compilation error. Should this
be kzalloc() instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925134010.2815025-1-nbg2974@gmail.com?part=1
prev parent reply other threads:[~2026-09-25 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:40 [RFC v9 0/1] leds: asus-aura-scsi: Add ASUS Aura RGB LED driver for ROG NVMe enclosures Liang Haowen
2026-09-25 13:40 ` [RFC v9 1/1] " Liang Haowen
2026-09-25 13:52 ` sashiko-bot [this message]
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=20260925135251.9EE881F00899@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nbg2974@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox