Thread (60 messages) 60 messages, 13 authors, 2023-02-10

Re: [PATCH 16/18] net: hns3: fix mixed module-builtin object

From: Alexander Lobakin <hidden>
Date: 2022-11-23 22:08:41
Also in: linux-kbuild, lkml

From: Salil Mehta <redacted>
Date: Tue, 22 Nov 2022 12:39:04 +0000
Hi Alexander,
quoted
From: Alexander Lobakin <redacted>
Sent: Saturday, November 19, 2022 11:10 PM
To: linux-kbuild@vger.kernel.org
[...]
quoted
diff --git a/drivers/net/ethernet/hisilicon/Kconfig
b/drivers/net/ethernet/hisilicon/Kconfig
index 3312e1d93c3b..9d2be93d0378 100644
--- a/drivers/net/ethernet/hisilicon/Kconfig
+++ b/drivers/net/ethernet/hisilicon/Kconfig
@@ -100,11 +100,15 @@ config HNS3

 if HNS3

+config HNS3_HCLGE_COMMON
+	tristate
+

This change does not looks right to me. We do not intend to expose these
...does not looks right to me -- because? The "wrong" line?
common files via kconfig and as a separate module. I would need time to
address this in a different way. 
I'm curious how 40 Kb of shared code can be addressed differently :D
This Kconfig opt is hidden, it can only be selected by some other
symbol -- in this case, by the PF and VF HCLGE options. Nothing gets
exposed in a way it shouldn't be.

Lemme guess, some cross-OS "shared code" in the OOT nobody in the
upstream cares about (for good), how familiar :D IIRC ZSTD folks
also weren't happy at first.
Please do not merge this change into the mainline!


Thanks
Salil


quoted
 config HNS3_HCLGE
 	tristate "Hisilicon HNS3 HCLGE Acceleration Engine & Compatibility
Layer Support"
 	default m
 	depends on PCI_MSI
 	depends on PTP_1588_CLOCK_OPTIONAL
+	select HNS3_HCLGE_COMMON
[...]
quoted
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 987271da6e9b..39a7ab51be31 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -13133,6 +13133,8 @@ static void __exit hclge_exit(void)
 module_init(hclge_init);
 module_exit(hclge_exit);

+MODULE_IMPORT_NS(HNS3_HCLGE_COMMON);

No, we don't want this.
I can export the common functions globally, without a namespace
if you prefer ._.

quoted
+
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Huawei Tech. Co., Ltd.");
 MODULE_DESCRIPTION("HCLGE Driver");
Thanks,
Olek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help