[PATCH 3/6] staging: vchiq_core: Rename struct vchiq_bulk 'userdata'

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

 



Rename the struct vchiq_bulk 'userdata' member to 'cb_data' to clarify
its purpose. 'cb_data' is meant to be passed to service callback
function in VCHIQ_BULK_MODE_CALLBACK mode.

No functional changes in this patch.

Signed-off-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>
---
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c    |  4 ++--
 .../vc04_services/interface/vchiq_arm/vchiq_core.c   | 12 ++++++------
 .../vc04_services/interface/vchiq_arm/vchiq_core.h   |  2 +-
 .../vc04_services/interface/vchiq_arm/vchiq_dev.c    |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index ff627b297bc4..c06a57ea9cf5 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -501,7 +501,7 @@ vchiq_bulk_transmit(struct vchiq_instance *instance, unsigned int handle, const
 		bulk_params.offset = (void *)data;
 		bulk_params.mode = mode;
 		bulk_params.size = size;
-		bulk_params.userdata = userdata;
+		bulk_params.cb_data = userdata;
 		bulk_params.dir = VCHIQ_BULK_TRANSMIT;
 
 		ret = vchiq_bulk_xfer_callback(instance, handle, &bulk_params);
@@ -536,7 +536,7 @@ int vchiq_bulk_receive(struct vchiq_instance *instance, unsigned int handle,
 		bulk_params.offset = (void *)data;
 		bulk_params.mode = mode;
 		bulk_params.size = size;
-		bulk_params.userdata = userdata;
+		bulk_params.cb_data = userdata;
 		bulk_params.dir = VCHIQ_BULK_RECEIVE;
 
 		ret = vchiq_bulk_xfer_callback(instance, handle, &bulk_params);
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 5e52f8954be7..6095adaf0cf6 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -455,15 +455,15 @@ mark_service_closing(struct vchiq_service *service)
 
 static inline int
 make_service_callback(struct vchiq_service *service, enum vchiq_reason reason,
-		      struct vchiq_header *header, void *bulk_userdata)
+		      struct vchiq_header *header, void *cb_data)
 {
 	int status;
 
 	dev_dbg(service->state->dev, "core: %d: callback:%d (%s, %pK, %pK)\n",
 		service->state->id, service->localport, reason_names[reason],
-		header, bulk_userdata);
+		header, cb_data);
 	status = service->base.callback(service->instance, reason, header, service->handle,
-					bulk_userdata);
+					cb_data);
 	if (status && (status != -EAGAIN)) {
 		dev_warn(service->state->dev,
 			 "core: %d: ignoring ERROR from callback to service %x\n",
@@ -1340,7 +1340,7 @@ static int service_notify_bulk(struct vchiq_service *service,
 		enum vchiq_reason reason = get_bulk_reason(bulk);
 
 		return make_service_callback(service, reason, NULL,
-					     bulk->userdata);
+					     bulk->cb_data);
 	}
 
 	return 0;
@@ -3065,7 +3065,7 @@ vchiq_bulk_xfer_queue_msg_killable(struct vchiq_service *service,
 	bulk->mode = bulk_params->mode;
 	bulk->dir = bulk_params->dir;
 	bulk->waiter = bulk_params->waiter;
-	bulk->userdata = bulk_params->userdata;
+	bulk->cb_data = bulk_params->cb_data;
 	bulk->size = bulk_params->size;
 	bulk->offset = bulk_params->offset;
 	bulk->uoffset = bulk_params->uoffset;
@@ -3082,7 +3082,7 @@ vchiq_bulk_xfer_queue_msg_killable(struct vchiq_service *service,
 
 	dev_dbg(state->dev, "core: %d: bt (%d->%d) %cx %x@%pad %pK\n",
 		state->id, service->localport, service->remoteport,
-		dir_char, bulk->size, &bulk->dma_addr, bulk->userdata);
+		dir_char, bulk->size, &bulk->dma_addr, bulk->cb_data);
 
 	/*
 	 * The slot mutex must be held when the service is being closed, so
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 88766c9180a9..f9a2268ad47e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -114,7 +114,7 @@ enum vchiq_bulk_dir {
 struct vchiq_bulk {
 	short mode;
 	short dir;
-	void *userdata;
+	void *cb_data;
 	struct bulk_waiter *waiter;
 	dma_addr_t dma_addr;
 	int size;
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
index 3d2827446f53..c99cd36a2696 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
@@ -338,7 +338,7 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance,
 		bulk_params.mode = args->mode;
 		bulk_params.size = args->size;
 		bulk_params.dir = dir;
-		bulk_params.userdata = args->userdata;
+		bulk_params.cb_data = args->userdata;
 
 		status = vchiq_bulk_xfer_callback(instance, args->handle,
 						  &bulk_params);
-- 
2.45.2





[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