]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Revert "nfp: update nfp_X logging definitions"
authorSimon Horman <simon.horman@corigine.com>
Sun, 19 Jun 2022 08:15:30 +0000 (10:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Jun 2022 10:28:01 +0000 (11:28 +0100)
This reverts commit 9386ebccfc59 ("nfp: update nfp_X logging definitions")

The reverted patch was intended to improve logging for the NFP driver by
including information such as the source code file and number in log
messages.

Unfortunately our experience is that this has not improved things as
we had hoped. The resulting logs are inconsistent with (most) other
kernel log messages. And rely on knowledge of the source code version
in order for the extra information to be useful.

Thus, revert the change.

We acknowledge that Jakub Kicinski <kuba@kernel.org> foresaw this problem.

Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h

index ddb34bfb9bef770c0ab723fd91774fdd84edccbc..3d379e9371849d515991d366307839d1a25233d7 100644 (file)
 #include <linux/ctype.h>
 #include <linux/types.h>
 #include <linux/sizes.h>
-#include <linux/stringify.h>
 
 #ifndef NFP_SUBSYS
 #define NFP_SUBSYS "nfp"
 #endif
 
-#define string_format(x) __FILE__ ":" __stringify(__LINE__) ": " x
-
-#define __nfp_err(cpp, fmt, args...) \
-       dev_err(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
-#define __nfp_warn(cpp, fmt, args...) \
-       dev_warn(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
-#define __nfp_info(cpp, fmt, args...) \
-       dev_info(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
-#define __nfp_dbg(cpp, fmt, args...) \
-       dev_dbg(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
-#define __nfp_printk(level, cpp, fmt, args...) \
-       dev_printk(level, nfp_cpp_device(cpp)->parent,  \
-                  NFP_SUBSYS ": " fmt, ## args)
-
 #define nfp_err(cpp, fmt, args...) \
-       __nfp_err(cpp, string_format(fmt), ## args)
+       dev_err(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
 #define nfp_warn(cpp, fmt, args...) \
-       __nfp_warn(cpp, string_format(fmt), ## args)
+       dev_warn(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
 #define nfp_info(cpp, fmt, args...) \
-       __nfp_info(cpp, string_format(fmt), ## args)
+       dev_info(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
 #define nfp_dbg(cpp, fmt, args...) \
-       __nfp_dbg(cpp, string_format(fmt), ## args)
+       dev_dbg(nfp_cpp_device(cpp)->parent, NFP_SUBSYS ": " fmt, ## args)
 #define nfp_printk(level, cpp, fmt, args...) \
-       __nfp_printk(level, cpp, string_format(fmt), ## args)
+       dev_printk(level, nfp_cpp_device(cpp)->parent,  \
+                  NFP_SUBSYS ": " fmt, ## args)
 
 #define PCI_64BIT_BAR_COUNT             3