[Spice-devel] [PATCH 17/20] char device: use 'device' rather than 'state' for var names
Jonathon Jongsma
jjongsma at redhat.com
Thu Apr 14 21:50:19 UTC 2016
Since the type name was changed, use variable names / debug statements
that are consistent with the new name.
---
server/char-device.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/server/char-device.c b/server/char-device.c
index 0b9e42d..bb047cd 100644
--- a/server/char-device.c
+++ b/server/char-device.c
@@ -700,13 +700,13 @@ void red_char_device_write_buffer_release(RedCharDevice *dev,
* char_device_state management *
********************************/
-void red_char_device_reset_dev_instance(RedCharDevice *state,
+void red_char_device_reset_dev_instance(RedCharDevice *dev,
SpiceCharDeviceInstance *sin)
{
- spice_debug("sin %p dev_state %p", sin, state);
- state->priv->sin = sin;
- sin->st = state;
- g_object_notify(G_OBJECT(state), "sin");
+ spice_debug("sin %p, char device %p", sin, dev);
+ dev->priv->sin = sin;
+ sin->st = dev;
+ g_object_notify(G_OBJECT(dev), "sin");
}
void *red_char_device_opaque_get(RedCharDevice *dev)
@@ -771,7 +771,7 @@ int red_char_device_client_add(RedCharDevice *dev,
dev->priv->wait_for_migrate_data = wait_for_migrate_data;
- spice_debug("dev_state %p client %p", dev, client);
+ spice_debug("char device %p, client %p", dev, client);
dev_client = red_char_device_client_new(client, do_flow_control,
max_send_queue_size,
num_client_tokens,
@@ -789,7 +789,7 @@ void red_char_device_client_remove(RedCharDevice *dev,
{
RedCharDeviceClient *dev_client;
- spice_debug("dev_state %p client %p", dev, client);
+ spice_debug("char device %p, client %p", dev, client);
dev_client = red_char_device_client_find(dev, client);
if (!dev_client) {
@@ -818,7 +818,7 @@ int red_char_device_client_exists(RedCharDevice *dev,
void red_char_device_start(RedCharDevice *dev)
{
- spice_debug("dev_state %p", dev);
+ spice_debug("char device %p", dev);
dev->priv->running = TRUE;
g_object_ref(dev);
while (red_char_device_write_to_device(dev) ||
@@ -828,7 +828,7 @@ void red_char_device_start(RedCharDevice *dev)
void red_char_device_stop(RedCharDevice *dev)
{
- spice_debug("dev_state %p", dev);
+ spice_debug("char device %p", dev);
dev->priv->running = FALSE;
dev->priv->active = FALSE;
if (dev->priv->write_to_dev_timer) {
@@ -842,7 +842,7 @@ void red_char_device_reset(RedCharDevice *dev)
red_char_device_stop(dev);
dev->priv->wait_for_migrate_data = FALSE;
- spice_debug("dev_state %p", dev);
+ spice_debug("char device %p", dev);
while (!ring_is_empty(&dev->priv->write_queue)) {
RingItem *item = ring_get_tail(&dev->priv->write_queue);
RedCharDeviceWriteBuffer *buf;
--
2.4.11
More information about the Spice-devel
mailing list