[spice-gtk,v3,2/9] usb-redir: cosmetic style fixes

Submitted by Yuri Benditovich on Aug. 12, 2019, 9:57 a.m.

Details

Message ID 20190812095729.32692-3-yuri.benditovich@daynix.com
State Superseded
Headers show
Series "added feature of sharing CD image" ( rev: 5 ) in Spice

Not browsing as part of any series.

Commit Message

Yuri Benditovich Aug. 12, 2019, 9:57 a.m.
From: Frediano Ziglio <fziglio@redhat.com>

---
 src/usb-backend.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/usb-backend.c b/src/usb-backend.c
index de2b55e..7f9fcc1 100644
--- a/src/usb-backend.c
+++ b/src/usb-backend.c
@@ -200,7 +200,7 @@  static int compare_dev_list_fire_callback(SpiceUsbBackend *be,
 }
 
 static LRESULT subclass_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
-                            UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
+                             UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
 {
     SpiceUsbBackend *be = (SpiceUsbBackend *)dwRefData;
     if (uMsg == WM_DEVICECHANGE && !be->redirecting) {
@@ -306,14 +306,16 @@  static int enable_hotplug_support(SpiceUsbBackend *be, const char **error_on_ena
     return rc;
 }
 
-static inline void set_redirecting(SpiceUsbBackend *be, gboolean on) {
+static inline void set_redirecting(SpiceUsbBackend *be, gboolean on)
+{
     /* nothing on Linux */
 }
 
 #endif
 
 /* lock functions for usbredirhost and usbredirparser */
-static void *usbredir_alloc_lock(void) {
+static void *usbredir_alloc_lock(void)
+{
     GMutex *mutex;
 
     mutex = g_new0(GMutex, 1);
@@ -322,20 +324,23 @@  static void *usbredir_alloc_lock(void) {
     return mutex;
 }
 
-static void usbredir_free_lock(void *user_data) {
+static void usbredir_free_lock(void *user_data)
+{
     GMutex *mutex = user_data;
 
     g_mutex_clear(mutex);
     g_free(mutex);
 }
 
-static void usbredir_lock_lock(void *user_data) {
+static void usbredir_lock_lock(void *user_data)
+{
     GMutex *mutex = user_data;
 
     g_mutex_lock(mutex);
 }
 
-static void usbredir_unlock_lock(void *user_data) {
+static void usbredir_unlock_lock(void *user_data)
+{
     GMutex *mutex = user_data;
 
     g_mutex_unlock(mutex);

Comments

> 
> From: Frediano Ziglio <fziglio@redhat.com>
> 
> ---
>  src/usb-backend.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)

Why not squashing into 1/9?
It's just space changes/fixes.
Not wanting to take credit for these changes to have it separate or
add my signed off or other.

> 
> diff --git a/src/usb-backend.c b/src/usb-backend.c
> index de2b55e..7f9fcc1 100644
> --- a/src/usb-backend.c
> +++ b/src/usb-backend.c
> @@ -200,7 +200,7 @@ static int compare_dev_list_fire_callback(SpiceUsbBackend
> *be,
>  }
>  
>  static LRESULT subclass_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
>  lParam,
> -                            UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
> +                             UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
>  {
>      SpiceUsbBackend *be = (SpiceUsbBackend *)dwRefData;
>      if (uMsg == WM_DEVICECHANGE && !be->redirecting) {
> @@ -306,14 +306,16 @@ static int enable_hotplug_support(SpiceUsbBackend *be,
> const char **error_on_ena
>      return rc;
>  }
>  
> -static inline void set_redirecting(SpiceUsbBackend *be, gboolean on) {
> +static inline void set_redirecting(SpiceUsbBackend *be, gboolean on)
> +{
>      /* nothing on Linux */
>  }
>  
>  #endif
>  
>  /* lock functions for usbredirhost and usbredirparser */
> -static void *usbredir_alloc_lock(void) {
> +static void *usbredir_alloc_lock(void)
> +{
>      GMutex *mutex;
>  
>      mutex = g_new0(GMutex, 1);
> @@ -322,20 +324,23 @@ static void *usbredir_alloc_lock(void) {
>      return mutex;
>  }
>  
> -static void usbredir_free_lock(void *user_data) {
> +static void usbredir_free_lock(void *user_data)
> +{
>      GMutex *mutex = user_data;
>  
>      g_mutex_clear(mutex);
>      g_free(mutex);
>  }
>  
> -static void usbredir_lock_lock(void *user_data) {
> +static void usbredir_lock_lock(void *user_data)
> +{
>      GMutex *mutex = user_data;
>  
>      g_mutex_lock(mutex);
>  }
>  
> -static void usbredir_unlock_lock(void *user_data) {
> +static void usbredir_unlock_lock(void *user_data)
> +{
>      GMutex *mutex = user_data;
>  
>      g_mutex_unlock(mutex);

Frediano
> 
> > 
> > From: Frediano Ziglio <fziglio@redhat.com>
> > 
> > ---
> >  src/usb-backend.c | 17 +++++++++++------
> >  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> Why not squashing into 1/9?
> It's just space changes/fixes.
> Not wanting to take credit for these changes to have it separate or
> add my signed off or other.
> 

I got it now why this was not squashed, it fixes hunks not in previous
one. Threat like a preparatory patch.

> > 
> > diff --git a/src/usb-backend.c b/src/usb-backend.c
> > index de2b55e..7f9fcc1 100644
> > --- a/src/usb-backend.c
> > +++ b/src/usb-backend.c
> > @@ -200,7 +200,7 @@ static int
> > compare_dev_list_fire_callback(SpiceUsbBackend
> > *be,
> >  }
> >  
> >  static LRESULT subclass_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
> >  lParam,
> > -                            UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
> > +                             UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
> >  {
> >      SpiceUsbBackend *be = (SpiceUsbBackend *)dwRefData;
> >      if (uMsg == WM_DEVICECHANGE && !be->redirecting) {
> > @@ -306,14 +306,16 @@ static int enable_hotplug_support(SpiceUsbBackend
> > *be,
> > const char **error_on_ena
> >      return rc;
> >  }
> >  
> > -static inline void set_redirecting(SpiceUsbBackend *be, gboolean on) {
> > +static inline void set_redirecting(SpiceUsbBackend *be, gboolean on)
> > +{
> >      /* nothing on Linux */
> >  }
> >  
> >  #endif
> >  
> >  /* lock functions for usbredirhost and usbredirparser */
> > -static void *usbredir_alloc_lock(void) {
> > +static void *usbredir_alloc_lock(void)
> > +{
> >      GMutex *mutex;
> >  
> >      mutex = g_new0(GMutex, 1);
> > @@ -322,20 +324,23 @@ static void *usbredir_alloc_lock(void) {
> >      return mutex;
> >  }
> >  
> > -static void usbredir_free_lock(void *user_data) {
> > +static void usbredir_free_lock(void *user_data)
> > +{
> >      GMutex *mutex = user_data;
> >  
> >      g_mutex_clear(mutex);
> >      g_free(mutex);
> >  }
> >  
> > -static void usbredir_lock_lock(void *user_data) {
> > +static void usbredir_lock_lock(void *user_data)
> > +{
> >      GMutex *mutex = user_data;
> >  
> >      g_mutex_lock(mutex);
> >  }
> >  
> > -static void usbredir_unlock_lock(void *user_data) {
> > +static void usbredir_unlock_lock(void *user_data)
> > +{
> >      GMutex *mutex = user_data;
> >  
> >      g_mutex_unlock(mutex);
>