From: sashiko-bot@kernel.org
To: VegetablCat <vegetablecat@foxmail.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2] Input: xpad - add support for Beitong KP series controllers
Date: Sun, 26 Jul 2026 08:29:45 +0000 [thread overview]
Message-ID: <20260726082945.E251E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <tencent_CD9DBF098D1B3BB565A1DD5761C1D34F4805@qq.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Using `IS_ENABLED(CONFIG_HID)` causes undefined reference linker errors when `CONFIG_JOYSTICK_XPAD=y` and `CONFIG_HID=m`.
--
--- Patch [1]: [PATCH v2] Input: xpad - add support for Beitong KP series controllers ---
commit aae02dfc97d563806266aab4cd52d4aaca3c3e89
Author: vegetablecat <vegetablecat@foxmail.com>
Subject: Input: xpad - add support for Beitong KP series controllers
This commit adds support for Beitong KP series controllers to the xpad driver,
triggering an XUSB10 descriptor read during probe to keep the devices in XInput
mode. It also introduces an optional HID receiver driver for the KP40D receiver
dongle to prevent interference from hid-generic.
> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> index feb8f368f834e..13b61681d6ec9 100644
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
[ ... ]
> @@ -2312,7 +2357,79 @@ static struct usb_driver xpad_driver = {
> .id_table = xpad_table,
> };
>
> -module_usb_driver(xpad_driver);
> +#if IS_ENABLED(CONFIG_HID)
[Severity: Low]
If the kernel is built with CONFIG_JOYSTICK_XPAD=y and CONFIG_HID=m,
IS_ENABLED(CONFIG_HID) evaluates to true.
Will this cause undefined reference linker errors in xpad_receiver_probe()
and xpad_init() since vmlinux cannot link against exported HID symbols like
hid_parse and hid_register_driver which would be built into a loadable module?
Would it be better to use IS_REACHABLE(CONFIG_HID) here, or enforce this via
a Kconfig dependency like "depends on HID || HID=n" instead?
> +static int xpad_receiver_probe(struct hid_device *hdev, const struct hid_device_id *id)
> +{
> + int error;
> +
> + error = hid_parse(hdev);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_CD9DBF098D1B3BB565A1DD5761C1D34F4805@qq.com?part=1
prev parent reply other threads:[~2026-07-26 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 8:21 [PATCH v2] Input: xpad - add support for Beitong KP series controllers VegetablCat
2026-07-26 8:29 ` 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=20260726082945.E251E1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vegetablecat@foxmail.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