[Spice-devel] [PATCH spice-server] smartcard: Remove a "rename" function
Jonathon Jongsma
jjongsma at redhat.com
Tue Feb 14 17:46:22 UTC 2017
I think I would change the summary to something like:
Remove an unnecessary wrapper function
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Fri, 2017-02-10 at 14:30 +0000, Frediano Ziglio wrote:
> smartcard_channel_client_pipe_add_push was just calling
> red_channel_client_pipe_add_push without any cast or other
> changes.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/smartcard.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/server/smartcard.c b/server/smartcard.c
> index f4bc40d..a7cc614 100644
> --- a/server/smartcard.c
> +++ b/server/smartcard.c
> @@ -124,7 +124,6 @@ typedef struct RedMsgItem {
> } RedMsgItem;
>
> static RedMsgItem *smartcard_get_vsc_msg_item(RedChannelClient *rcc,
> VSCMsgHeader *vheader);
> -static void smartcard_channel_client_pipe_add_push(RedChannelClient
> *rcc, RedPipeItem *item);
>
> static struct Readers {
> uint32_t num;
> @@ -186,6 +185,9 @@ static RedPipeItem
> *smartcard_read_msg_from_device(RedCharDevice *self,
> return NULL;
> }
>
> +/* this is called from both device input and client input. since the
> device is
> + * a usb device, the context is still the main thread
> (kvm_main_loop, timers)
> + * so no mutex is required. */
> static void smartcard_send_msg_to_client(RedCharDevice *self,
> RedPipeItem *msg,
> RedClient *client)
> @@ -196,7 +198,7 @@ static void
> smartcard_send_msg_to_client(RedCharDevice *self,
> spice_assert(dev->priv->scc &&
> red_channel_client_get_client(rcc) == client);
> red_pipe_item_ref(msg);
> - smartcard_channel_client_pipe_add_push(rcc, msg);
> + red_channel_client_pipe_add_push(rcc, msg);
> }
>
> static void smartcard_send_tokens_to_client(RedCharDevice *self,
> @@ -460,15 +462,6 @@ static void
> smartcard_channel_send_item(RedChannelClient *rcc, RedPipeItem *item
> red_channel_client_begin_send_message(rcc);
> }
>
> -/* this is called from both device input and client input. since the
> device is
> - * a usb device, the context is still the main thread
> (kvm_main_loop, timers)
> - * so no mutex is required. */
> -static void smartcard_channel_client_pipe_add_push(RedChannelClient
> *rcc,
> - RedPipeItem
> *item)
> -{
> - red_channel_client_pipe_add_push(rcc, item);
> -}
> -
> static void smartcard_free_vsc_msg_item(RedPipeItem *base)
> {
> RedMsgItem *item = SPICE_UPCAST(RedMsgItem, base);
More information about the Spice-devel
mailing list