diff mbox series

[rdma-next,v2,1/5] RDMA/bnxt_re: Depend on bnxt ethernet driver and not blindly select it

Message ID 20210401065715.565226-2-leon@kernel.org (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series Get rid of custom made module dependency | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 1 maintainers not CCed: jgg@ziepe.ca
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Leon Romanovsky April 1, 2021, 6:57 a.m. UTC
From: Leon Romanovsky <leonro@nvidia.com>

The "select" kconfig keyword provides reverse dependency, however it
doesn't check that selected symbol meets its own dependencies. Usually
"select" is used for non-visible symbols, so instead of trying to keep
dependencies in sync with BNXT ethernet driver, simply "depends on" it,
like Kconfig documentation suggest.

* CONFIG_PCI is already required by BNXT
* CONFIG_NETDEVICES and CONFIG_ETHERNET are needed to chose BNXT

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/bnxt_re/Kconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Devesh Sharma April 21, 2021, 5:50 p.m. UTC | #1
On Thu, Apr 1, 2021 at 12:27 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The "select" kconfig keyword provides reverse dependency, however it
> doesn't check that selected symbol meets its own dependencies. Usually
> "select" is used for non-visible symbols, so instead of trying to keep
> dependencies in sync with BNXT ethernet driver, simply "depends on" it,
> like Kconfig documentation suggest.
>
> * CONFIG_PCI is already required by BNXT
> * CONFIG_NETDEVICES and CONFIG_ETHERNET are needed to chose BNXT
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/hw/bnxt_re/Kconfig | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/infiniband/hw/bnxt_re/Kconfig b/drivers/infiniband/hw/bnxt_re/Kconfig
> index 0feac5132ce1..6a17f5cdb020 100644
> --- a/drivers/infiniband/hw/bnxt_re/Kconfig
> +++ b/drivers/infiniband/hw/bnxt_re/Kconfig
> @@ -2,9 +2,7 @@
>  config INFINIBAND_BNXT_RE
>         tristate "Broadcom Netxtreme HCA support"
>         depends on 64BIT
> -       depends on ETHERNET && NETDEVICES && PCI && INET && DCB
> -       select NET_VENDOR_BROADCOM
> -       select BNXT
> +       depends on INET && DCB && BNXT
>         help
>           This driver supports Broadcom NetXtreme-E 10/25/40/50 gigabit
>           RoCE HCAs.  To compile this driver as a module, choose M here:
> --
> 2.30.2
>
Acked-By: Devesh Sharma <devesh.sharma@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/Kconfig b/drivers/infiniband/hw/bnxt_re/Kconfig
index 0feac5132ce1..6a17f5cdb020 100644
--- a/drivers/infiniband/hw/bnxt_re/Kconfig
+++ b/drivers/infiniband/hw/bnxt_re/Kconfig
@@ -2,9 +2,7 @@ 
 config INFINIBAND_BNXT_RE
 	tristate "Broadcom Netxtreme HCA support"
 	depends on 64BIT
-	depends on ETHERNET && NETDEVICES && PCI && INET && DCB
-	select NET_VENDOR_BROADCOM
-	select BNXT
+	depends on INET && DCB && BNXT
 	help
 	  This driver supports Broadcom NetXtreme-E 10/25/40/50 gigabit
 	  RoCE HCAs.  To compile this driver as a module, choose M here: