-
Notifications
You must be signed in to change notification settings - Fork 105
[Deepin-Kernel-SIG] [linux 6.18-y] [Wangxun]deepin: net: txgbe: fix CONFIG_DCB=N compile error #1405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Deepin-Kernel-SIG] [linux 6.18-y] [Wangxun]deepin: net: txgbe: fix CONFIG_DCB=N compile error #1405
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,10 +11,7 @@ txgbe-objs := txgbe_main.o \ | |||||||
| txgbe_phy.o \ | ||||||||
| txgbe_ethtool.o \ | ||||||||
| txgbe_bp.o \ | ||||||||
| txgbe_dcb_nl.o \ | ||||||||
| txgbe_dcb.o \ | ||||||||
| txgbe_debugfs.o \ | ||||||||
| txgbe_fcoe.o \ | ||||||||
| txgbe_mbx.o \ | ||||||||
| txgbe_mtd.o \ | ||||||||
| txgbe_e56.o \ | ||||||||
|
|
@@ -29,9 +26,7 @@ txgbe-objs := txgbe_main.o \ | |||||||
| txgbe_pcierr.o \ | ||||||||
| txgbe_e56_bp.o | ||||||||
|
|
||||||||
| KERNELDIR ?= /lib/modules/$(shell uname -r)/build | ||||||||
| all: | ||||||||
| $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | ||||||||
| clean: | ||||||||
| $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | ||||||||
| rm -rf *.${MANSECTION}.gz *.ko | ||||||||
| txgbe-$(CONFIG_DCB) += txgbe_dcb_nl.o txgbe_dcb.o | ||||||||
| txgbe-$(CONFIG_FCOE:m=y) += txgbe_fcoe.o | ||||||||
| txgbe-$(CONFIG_SYSFS) += txgbe_sysfs.o | ||||||||
| txgbe-$(CONFIG_DEBUG_FS) += txgbe_debugfs.o | ||||||||
|
Comment on lines
+31
to
+32
|
||||||||
| txgbe-$(CONFIG_SYSFS) += txgbe_sysfs.o | |
| txgbe-$(CONFIG_DEBUG_FS) += txgbe_debugfs.o | |
| txgbe-$(CONFIG_DEBUG_FS) += txgbe_debugfs.o |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The txgbe_debugfs.o object is already included in the main txgbe-objs list at line 14, and now it's being conditionally added again at line 32. This will cause duplicate object files in the build when CONFIG_DEBUG_FS is enabled. Remove either the unconditional inclusion at line 14 or the conditional inclusion at line 32.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1041,8 +1041,9 @@ struct txgbe_cb { | |||||||||||||||
| /* ESX txgbe CIM IOCTL definition */ | ||||||||||||||||
| void txgbe_sysfs_exit(struct txgbe_adapter *adapter); | ||||||||||||||||
| int txgbe_sysfs_init(struct txgbe_adapter *adapter); | ||||||||||||||||
|
|
||||||||||||||||
| #if IS_ENABLED(CONFIG_DCB) | ||||||||||||||||
| extern struct dcbnl_rtnl_ops dcbnl_ops; | ||||||||||||||||
| #endif /* CONFIG_DCB */ | ||||||||||||||||
| int txgbe_copy_dcb_cfg(struct txgbe_adapter *adapter, int tc_max); | ||||||||||||||||
|
|
||||||||||||||||
| u8 txgbe_dcb_txq_to_tc(struct txgbe_adapter *adapter, u8 index); | ||||||||||||||||
|
Comment on lines
+1046
to
1049
|
||||||||||||||||
| #endif /* CONFIG_DCB */ | |
| int txgbe_copy_dcb_cfg(struct txgbe_adapter *adapter, int tc_max); | |
| u8 txgbe_dcb_txq_to_tc(struct txgbe_adapter *adapter, u8 index); | |
| int txgbe_copy_dcb_cfg(struct txgbe_adapter *adapter, int tc_max); | |
| u8 txgbe_dcb_txq_to_tc(struct txgbe_adapter *adapter, u8 index); | |
| #endif /* CONFIG_DCB */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax for conditional object compilation in Makefiles should use the CONFIG variable directly without the :m=y suffix. The correct syntax for CONFIG_FCOE should be:
txgbe-$(CONFIG_FCOE) += txgbe_fcoe.o
The :m=y suffix is not standard kbuild syntax and may cause build issues.