Skip to contentSkip to conversation

linux/compat.h: Add netdev_### log macros

PATCH In review Bin Meng 2 participants 8 messages Jul 26, 2018 – Oct 11, 2018 Network drivers

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 linux/compat.h: Add netdev_### log macros

Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h.

---

 drivers/net/mvneta.c   |  8 --------
 drivers/net/mvpp2.c    | 10 ----------
 include/linux/compat.h | 19 +++++++++++++++++++
 3 files changed, 19 insertions(+), 18 deletions(-)
drivers/net/mvneta.c +0 -8
index ab697b9..8cb04b5 100644
@@ -34,14 +34,6 @@ DECLARE_GLOBAL_DATA_PTR;
 # error Marvell mvneta requires PHYLIB
 #endif
 
-/* Some linux -> U-Boot compatibility stuff */
-#define netdev_err(dev, fmt, args...)		\
-	printf(fmt, ##args)
-#define netdev_warn(dev, fmt, args...)		\
-	printf(fmt, ##args)
-#define netdev_info(dev, fmt, args...)		\
-	printf(fmt, ##args)
-
 #define CONFIG_NR_CPUS		1
 #define ETH_HLEN		14	/* Total octets in header */
 
drivers/net/mvpp2.c +0 -10
index 62c0c2b..5c1f5fc 100644
@@ -35,16 +35,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* Some linux -> U-Boot compatibility stuff */
-#define netdev_err(dev, fmt, args...)		\
-	printf(fmt, ##args)
-#define netdev_warn(dev, fmt, args...)		\
-	printf(fmt, ##args)
-#define netdev_info(dev, fmt, args...)		\
-	printf(fmt, ##args)
-#define netdev_dbg(dev, fmt, args...)		\
-	printf(fmt, ##args)
-
 #define ETH_ALEN	6		/* Octets in one ethernet addr	*/
 
 #define __verify_pcpu_ptr(ptr)						\
include/linux/compat.h +19 -0
index 6e3feb6..d0f51ba 100644
@@ -43,6 +43,25 @@ extern struct p_current *current;
 #define dev_warn(dev, fmt, args...)		\
 	printf(fmt, ##args)
 
+#define netdev_emerg(dev, fmt, args...)		\
+	printf(fmt, ##args)
+#define netdev_alert(dev, fmt, args...)		\
+	printf(fmt, ##args)
+#define netdev_crit(dev, fmt, args...)		\
+	printf(fmt, ##args)
+#define netdev_err(dev, fmt, args...)		\
+	printf(fmt, ##args)
+#define netdev_warn(dev, fmt, args...)		\
+	printf(fmt, ##args)
+#define netdev_notice(dev, fmt, args...)	\
+	printf(fmt, ##args)
+#define netdev_info(dev, fmt, args...)		\
+	printf(fmt, ##args)
+#define netdev_dbg(dev, fmt, args...)		\
+	debug(fmt, ##args)
+#define netdev_vdbg(dev, fmt, args...)		\
+	debug(fmt, ##args)
+
 #define GFP_ATOMIC ((gfp_t) 0)
 #define GFP_KERNEL ((gfp_t) 0)
 #define GFP_NOFS ((gfp_t) 0)
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 1/1 linux/compat.h: Add netdev_### log macros

Hi Joe,

Quoted 9 lines · Joe Hershberger
Quoted 5 lines · Bin Meng

Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h.

When will the following be merged? Thanks!

http://patchwork.ozlabs.org/project/uboot/list/?series=57711
http://patchwork.ozlabs.org/project/uboot/list/?series=57715
http://patchwork.ozlabs.org/project/uboot/list/?series=58148
http://patchwork.ozlabs.org/project/uboot/list/?series=58485

Regards,
Bin

#3 lore raw

PATCH 1/1 linux/compat.h: Add netdev_### log macros

Hi Bin,

Quoted 10 lines · Bin Meng

Hi Joe,

Quoted 6 lines · Joe Hershberger
Quoted 4 lines · Bin Meng

Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

When will the following be merged? Thanks!

Now that we have a release, I'll try to get them in my queue next week.

Quoted 11 lines

http://patchwork.ozlabs.org/project/uboot/list/?series=57711
http://patchwork.ozlabs.org/project/uboot/list/?series=57715
http://patchwork.ozlabs.org/project/uboot/list/?series=58148
http://patchwork.ozlabs.org/project/uboot/list/?series=58485

Regards,
Bin
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

author
#4 lore raw

PATCH 1/1 linux/compat.h: Add netdev_### log macros

Hi Joe,

Quoted 13 lines · Joe Hershberger

Hi Bin,

Quoted 10 lines · Bin Meng

Hi Joe,

Quoted 6 lines · Joe Hershberger
Quoted 4 lines · Bin Meng

Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

When will the following be merged? Thanks!

Now that we have a release, I'll try to get them in my queue next week.

ping ?

Quoted 4 lines
Quoted 4 lines

http://patchwork.ozlabs.org/project/uboot/list/?series=57711
http://patchwork.ozlabs.org/project/uboot/list/?series=57715
http://patchwork.ozlabs.org/project/uboot/list/?series=58148
http://patchwork.ozlabs.org/project/uboot/list/?series=58485

Regards,
Bin

#5 lore raw

PATCH 1/1 linux/compat.h: Add netdev_### log macros

Quoted 19 lines · Bin Meng

Hi Joe,

Quoted 15 lines · Joe Hershberger

Hi Bin,

Quoted 12 lines · Bin Meng

Hi Joe,

Quoted 8 lines · Joe Hershberger
Quoted 5 lines · Bin Meng

Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

When will the following be merged? Thanks!

Now that we have a release, I'll try to get them in my queue next week.

ping ?

Part of my current test building on travis:
https://travis-ci.org/jhershbe/u-boot/builds/439322261

Quoted 11 lines
Quoted 4 lines
Quoted 4 lines

http://patchwork.ozlabs.org/project/uboot/list/?series=57711
http://patchwork.ozlabs.org/project/uboot/list/?series=57715
http://patchwork.ozlabs.org/project/uboot/list/?series=58148
http://patchwork.ozlabs.org/project/uboot/list/?series=58485

Regards,
Bin
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

author
#6 lore raw

PATCH 1/1 linux/compat.h: Add netdev_### log macros

Hi Joe,

Quoted 25 lines · Joe Hershberger
Quoted 23 lines · Bin Meng

Hi Joe,

Quoted 19 lines · Joe Hershberger

Hi Bin,

Quoted 15 lines · Bin Meng

Hi Joe,

Quoted 9 lines · Joe Hershberger
Quoted 5 lines · Bin Meng

Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h.

When will the following be merged? Thanks!

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Now that we have a release, I'll try to get them in my queue next week.

ping ?

Part of my current test building on travis:
https://travis-ci.org/jhershbe/u-boot/builds/439322261

Please let me know when the PR will be sent. I have some patches that are dependent on these. Thanks!

Regards,
Bin