From: sashiko-bot@kernel.org
To: "Yanze Zhang" <zhang.yanze@zte.com.cn>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma v8 1/7] RDMA/zrdma: Add build infrastructure and module skeleton
Date: Mon, 02 Nov 2026 08:45:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-193136@kernel.org> (raw)
In-Reply-To: <20261102082026.2645777-2-zhang.yanze@zte.com.cn>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] RDMA/zrdma: Kconfig depends on bool DINGHAI instead of tristate DINGHAI_PF
- [Low] RDMA/zrdma: open-coded zrdma_module_init() instead of module_auxiliary_driver()
--
commit 255288601ed5fbab9c26b7e4b182fd67e8a9395c
Author: Yanze Zhang <zhang.yanze@zte.com.cn>
RDMA/zrdma: Add build infrastructure and module skeleton
This commit adds the MAINTAINERS entry, Kconfig, Makefile, and a minimal
auxiliary driver module skeleton for the ZTE DingHai RDMA (zrdma) driver.
> diff --git a/drivers/infiniband/hw/zrdma/Kconfig b/drivers/infiniband/hw/zrdma/Kconfig
> new file mode 100644
> index 0000000000000..43cb55ae9c93b
> --- /dev/null
> +++ b/drivers/infiniband/hw/zrdma/Kconfig
> @@ -0,0 +1,11 @@
> +# SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
> +config INFINIBAND_ZRDMA
> + tristate "ZTE Ethernet Protocol Driver for RDMA"
> + depends on DINGHAI
> + select AUXILIARY_BUS
[Severity: Medium]
As reported by Zhu Yanjun on v3 [1], should INFINIBAND_ZRDMA depend on
DINGHAI_PF instead of DINGHAI?
In drivers/net/ethernet/zte/dinghai/Kconfig, DINGHAI is only a boolean vendor
menu guard, whereas the DingHai PF driver (dinghai10e.o) that creates the
dinghai10e.rdma_aux auxiliary device is controlled by the tristate symbol
DINGHAI_PF:
drivers/net/ethernet/zte/dinghai/Kconfig:
config DINGHAI_PF
tristate "ZTE DingHai PF (Physical Function) driver"
drivers/net/ethernet/zte/dinghai/Makefile:
obj-$(CONFIG_DINGHAI_PF) += dinghai10e.o
Depending only on the bool DINGHAI symbol allows configuring
CONFIG_INFINIBAND_ZRDMA=y when CONFIG_DINGHAI_PF=n or CONFIG_DINGHAI_PF=m.
> diff --git a/drivers/infiniband/hw/zrdma/zrdma_main.c b/drivers/infiniband/hw/zrdma/zrdma_main.c
> new file mode 100644
> index 0000000000000..af1d37be63362
> --- /dev/null
> +++ b/drivers/infiniband/hw/zrdma/zrdma_main.c
> @@ -0,0 +1,57 @@
[ ... ]
> +static struct auxiliary_driver zxdh_auxiliary_drv = {
> + .name = ZXDH_RDMA_DEV_NAME,
> + .id_table = zxdh_auxiliary_id_table,
> + .probe = zxdh_probe,
> + .remove = zxdh_remove,
> +};
> +
> +static int __init zrdma_module_init(void)
> +{
> + return auxiliary_driver_register(&zxdh_auxiliary_drv);
> +}
> +
> +static void __exit zrdma_module_exit(void)
> +{
> + auxiliary_driver_unregister(&zxdh_auxiliary_drv);
> +}
> +
> +module_init(zrdma_module_init);
> +module_exit(zrdma_module_exit);
[Severity: Low]
This isn't a bug, but since zrdma_module_init() and zrdma_module_exit() only
register and unregister zxdh_auxiliary_drv, could this use
module_auxiliary_driver(zxdh_auxiliary_drv) instead of open-coding the module
init and exit functions?
[1] https://lore.kernel.org/r/21b7b324-9fd2-402d-8695-5dd061adb957@linux.dev
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102082026.2645777-1-zhang.yanze@zte.com.cn?part=1
next prev parent reply other threads:[~2026-11-02 8:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 8:20 [PATCH rdma v8 0/7] Add ZTE DingHai Ethernet Protocol Driver for RDMA Yanze Zhang
2026-11-02 8:20 ` [PATCH rdma v8 1/7] RDMA/zrdma: Add build infrastructure and module skeleton Yanze Zhang
2026-11-02 8:45 ` sashiko-bot [this message]
2026-11-02 8:20 ` [PATCH rdma v8 2/7] RDMA/zrdma: Add core data structures and ABI definitions Yanze Zhang
2026-11-02 8:55 ` sashiko-bot
2026-11-02 8:20 ` [PATCH rdma v8 3/7] RDMA/zrdma: Add internal headers and hardware register definitions Yanze Zhang
2026-11-02 9:00 ` sashiko-bot
2026-11-02 8:20 ` [PATCH rdma v8 4/7] RDMA/zrdma: Add hardware resource initialization and verbs skeleton Yanze Zhang
2026-11-02 9:14 ` sashiko-bot
2026-11-02 8:20 ` [PATCH rdma v8 5/7] RDMA/zrdma: Implement device and port query operations Yanze Zhang
2026-11-02 9:31 ` sashiko-bot
2026-11-02 8:20 ` [PATCH rdma v8 6/7] RDMA/zrdma: Add device probe and remove logic Yanze Zhang
2026-11-02 9:36 ` sashiko-bot
2026-11-02 8:20 ` [PATCH rdma v8 7/7] RDMA/zrdma: Implement context, PD, and mmap operations Yanze Zhang
2026-11-02 9:47 ` sashiko-bot
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=sashiko-outbox-193136@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhang.yanze@zte.com.cn \
/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.