[PATCH v2 1/8] staging: vc04_services: Pass struct device to vchiq_log_dump_mem()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pass struct device pointer to vchiq_log_dump_mem(). In subsequent
commits, vchiq_log_* macros will be ported to use dynamic debug
(dev_dbg()), hence they need access to a struct device pointer.

No functional changes intended in this commit.

Signed-off-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>
---
 .../vc04_services/interface/vchiq_arm/vchiq_core.c    | 11 ++++++-----
 .../vc04_services/interface/vchiq_arm/vchiq_core.h    |  3 ++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 596894338cb4..a12afac95dcd 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -1052,7 +1052,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service,
 
 		if (SRVTRACE_ENABLED(service,
 				     VCHIQ_LOG_INFO))
-			vchiq_log_dump_mem("Sent", 0,
+			vchiq_log_dump_mem(state->dev, "Sent", 0,
 					   header->data,
 					   min_t(size_t, 16, callback_result));
 
@@ -1201,7 +1201,7 @@ queue_message_sync(struct vchiq_state *state, struct vchiq_service *service,
 	if (service) {
 		if (SRVTRACE_ENABLED(service,
 				     VCHIQ_LOG_INFO))
-			vchiq_log_dump_mem("Sent", 0,
+			vchiq_log_dump_mem(state->dev, "Sent", 0,
 					   header->data,
 					   min_t(size_t, 16, callback_result));
 
@@ -1653,7 +1653,7 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header)
 			       msg_type_str(type), type, VCHIQ_FOURCC_AS_4CHARS(svc_fourcc),
 			       remoteport, localport, size);
 		if (size > 0)
-			vchiq_log_dump_mem("Rcvd", 0, header->data, min(16, size));
+			vchiq_log_dump_mem(state->dev, "Rcvd", 0, header->data, min(16, size));
 	}
 
 	if (((unsigned long)header & VCHIQ_SLOT_MASK) +
@@ -2065,7 +2065,7 @@ sync_func(void *v)
 					msg_type_str(type), VCHIQ_FOURCC_AS_4CHARS(svc_fourcc),
 					remoteport, localport, size);
 			if (size > 0)
-				vchiq_log_dump_mem("Rcvd", 0, header->data, min(16, size));
+				vchiq_log_dump_mem(state->dev, "Rcvd", 0, header->data, min(16, size));
 		}
 
 		switch (type) {
@@ -3665,7 +3665,8 @@ int vchiq_send_remote_use_active(struct vchiq_state *state)
 			     NULL, NULL, 0, 0);
 }
 
-void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes)
+void vchiq_log_dump_mem(struct device *dev, const char *label, u32 addr,
+			const void *void_mem, size_t num_bytes)
 {
 	const u8 *mem = void_mem;
 	size_t offset;
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index ec1a3caefaea..8b234cad24ea 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -600,7 +600,8 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state,
 
 void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate);
 
-void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes);
+void vchiq_log_dump_mem(struct device *dev, const char *label, u32 addr,
+			const void *void_mem, size_t num_bytes);
 
 int vchiq_remove_service(struct vchiq_instance *instance, unsigned int service);
 
-- 
2.41.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux