Skip to contentSkip to conversation

cdx: Replace custom mcdi logging with print_hex_dump_debug()

PATCH Superseded Abhijit Gangurde 2 participants 2 messages Jun 13, 2023

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 cdx: Replace custom mcdi logging with print_hex_dump_debug()

Replace custom mcdi logging for send and receive requests with dynamic debug method print_hex_dump_debug().

Fixes eb96b740192b ("cdx: add MCDI protocol interface for firmware interaction")

---
Changes v3->v4:
- Custom logging under macro CONFIG_MCDI_LOGGING is replaced with dynamic debug

Changes v2->v3:
- Dropped sysfs entry changes from v2

Changes v1->v2:
- Moved CONFIG_CDX_MCDI_LOGGING flag to header file
- Added sysfs entry to enable/disable mcdi logging

 drivers/cdx/controller/Kconfig | 10 ----
 drivers/cdx/controller/mcdi.c  | 86 ++++------------------------------
 drivers/cdx/controller/mcdi.h  |  6 ---
 3 files changed, 9 insertions(+), 93 deletions(-)
drivers/cdx/controller/Kconfig +0 -10
index c3e3b9ff8dfe..61bf17fbe433 100644
@@ -18,14 +18,4 @@ config CDX_CONTROLLER
 
 	  If unsure, say N.
 
-config MCDI_LOGGING
-	bool "MCDI Logging for the CDX controller"
-	depends on CDX_CONTROLLER
-	help
-	  Enable MCDI Logging for
-	  the CDX Controller for debug
-	  purpose.
-
-	  If unsure, say N.
-
 endif
drivers/cdx/controller/mcdi.c +9 -77

136 lines not on this page · raw message

drivers/cdx/controller/mcdi.h +0 -6
index 0bfbeab04e43..54a65e9760ae 100644
@@ -153,8 +153,6 @@ struct cdx_mcdi_cmd {
  * @mode: Poll for mcdi completion, or wait for an mcdi_event
  * @prev_seq: The last used sequence number
  * @new_epoch: Indicates start of day or start of MC reboot recovery
- * @logging_buffer: Buffer that may be used to build MCDI tracing messages
- * @logging_enabled: Whether to trace MCDI
  */
 struct cdx_mcdi_iface {
 	struct cdx_mcdi *cdx;
@@ -170,10 +168,6 @@ struct cdx_mcdi_iface {
 	enum cdx_mcdi_mode mode;
 	u8 prev_seq;
 	bool new_epoch;
-#ifdef CONFIG_MCDI_LOGGING
-	bool logging_enabled;
-	char *logging_buffer;
-#endif
 };
 
 /**
Signature · 1 line
2.25.1
#1 lore raw
Quoted 4 lines · Abhijit Gangurde

Replace custom mcdi logging for send and receive requests with dynamic debug method print_hex_dump_debug().

Fixes eb96b740192b ("cdx: add MCDI protocol interface for firmware interaction")

This isn't a "fix", right?

Quoted 2 lines

This wasn't a "bug report" this was a "the code should be changed to not do this" type of thing. Part of normal development.

Other than those nits, looks good, want to fix this up and resend a v5?

thanks,

greg k-h