Re: [PATCH v5 net-next 01/11] net/nebula-matrix: add minimum nbl build framework

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-02-27 22:31:07
Also in
linux-doc, lkml
Reply to
illusion.wang, 2026-02-26
quoted hunk ↗ jump to hunk
+ccflags-y += -I$(srctree)/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/
+ccflags-y += -I$(srctree)/drivers/net/ethernet/nebula-matrix/nbl/
diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_core.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_core.h
new file mode 100644
index 000000000000..cf425dc8beb7
--- /dev/null
+++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_core.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2025 Nebula Matrix Limited.
+ * Author:
+ */
+
+#ifndef _NBL_CORE_H_
+#define _NBL_CORE_H_
+
+#include <linux/pci.h>
Please put all standard linux include files in the .c file which needs
it.

A large part of the build time with Linux is the C preprocessor. There
are lots of unneeded includes, or include files included multiple
times. It gets easier to see this happening when only .c files include
system includes. 
+#include "nbl_include.h"
You might also want to flatten your own include files, don't have them
nested.

	Andrew
Thread (24 messages) 24 messages, 2 authors, last reply 2026-03-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help