Re: [PATCH 2/2] Input-evdev: Rename a jump label in two functions

2016-09-24 Thread Dmitry Torokhov
On Sat, Sep 24, 2016 at 4:10 AM, SF Markus Elfring
 wrote:
> From: Markus Elfring 
> Date: Sat, 24 Sep 2016 12:50:31 +0200
>
> Adjust a jump label according to the current Linux coding style convention.
> Thus replace the identifier "out" by "unlock".

No, just no.

>
> Signed-off-by: Markus Elfring 
> ---
>  drivers/input/evdev.c | 12 +---
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index 83fcfd6..548874d 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -545,22 +545,21 @@ static ssize_t evdev_write(struct file *file, const 
> char __user *buffer,
>
> if (!evdev->exist || client->revoked) {
> retval = -ENODEV;
> -   goto out;
> +   goto unlock;
> }
>
> while (retval + input_event_size() <= count) {
>
> if (input_event_from_user(buffer + retval, )) {
> retval = -EFAULT;
> -   goto out;
> +   goto unlock;
> }
> retval += input_event_size();
>
> input_inject_event(>handle,
>event.type, event.code, event.value);
> }
> -
> - out:
> +unlock:
> mutex_unlock(>mutex);
> return retval;
>  }
> @@ -1292,12 +1291,11 @@ static long evdev_ioctl_handler(struct file *file, 
> unsigned int cmd,
>
> if (!evdev->exist || client->revoked) {
> retval = -ENODEV;
> -   goto out;
> +   goto unlock;
> }
>
> retval = evdev_do_ioctl(file, cmd, p, compat_mode);
> -
> - out:
> +unlock:
> mutex_unlock(>mutex);
> return retval;
>  }
> --
> 2.10.0
>



-- 
Dmitry


Re: [PATCH 2/2] Input-evdev: Rename a jump label in two functions

2016-09-24 Thread Dmitry Torokhov
On Sat, Sep 24, 2016 at 4:10 AM, SF Markus Elfring
 wrote:
> From: Markus Elfring 
> Date: Sat, 24 Sep 2016 12:50:31 +0200
>
> Adjust a jump label according to the current Linux coding style convention.
> Thus replace the identifier "out" by "unlock".

No, just no.

>
> Signed-off-by: Markus Elfring 
> ---
>  drivers/input/evdev.c | 12 +---
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index 83fcfd6..548874d 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -545,22 +545,21 @@ static ssize_t evdev_write(struct file *file, const 
> char __user *buffer,
>
> if (!evdev->exist || client->revoked) {
> retval = -ENODEV;
> -   goto out;
> +   goto unlock;
> }
>
> while (retval + input_event_size() <= count) {
>
> if (input_event_from_user(buffer + retval, )) {
> retval = -EFAULT;
> -   goto out;
> +   goto unlock;
> }
> retval += input_event_size();
>
> input_inject_event(>handle,
>event.type, event.code, event.value);
> }
> -
> - out:
> +unlock:
> mutex_unlock(>mutex);
> return retval;
>  }
> @@ -1292,12 +1291,11 @@ static long evdev_ioctl_handler(struct file *file, 
> unsigned int cmd,
>
> if (!evdev->exist || client->revoked) {
> retval = -ENODEV;
> -   goto out;
> +   goto unlock;
> }
>
> retval = evdev_do_ioctl(file, cmd, p, compat_mode);
> -
> - out:
> +unlock:
> mutex_unlock(>mutex);
> return retval;
>  }
> --
> 2.10.0
>



-- 
Dmitry


[PATCH 2/2] Input-evdev: Rename a jump label in two functions

2016-09-24 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 24 Sep 2016 12:50:31 +0200

Adjust a jump label according to the current Linux coding style convention.
Thus replace the identifier "out" by "unlock".

Signed-off-by: Markus Elfring 
---
 drivers/input/evdev.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 83fcfd6..548874d 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -545,22 +545,21 @@ static ssize_t evdev_write(struct file *file, const char 
__user *buffer,
 
if (!evdev->exist || client->revoked) {
retval = -ENODEV;
-   goto out;
+   goto unlock;
}
 
while (retval + input_event_size() <= count) {
 
if (input_event_from_user(buffer + retval, )) {
retval = -EFAULT;
-   goto out;
+   goto unlock;
}
retval += input_event_size();
 
input_inject_event(>handle,
   event.type, event.code, event.value);
}
-
- out:
+unlock:
mutex_unlock(>mutex);
return retval;
 }
@@ -1292,12 +1291,11 @@ static long evdev_ioctl_handler(struct file *file, 
unsigned int cmd,
 
if (!evdev->exist || client->revoked) {
retval = -ENODEV;
-   goto out;
+   goto unlock;
}
 
retval = evdev_do_ioctl(file, cmd, p, compat_mode);
-
- out:
+unlock:
mutex_unlock(>mutex);
return retval;
 }
-- 
2.10.0



[PATCH 2/2] Input-evdev: Rename a jump label in two functions

2016-09-24 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 24 Sep 2016 12:50:31 +0200

Adjust a jump label according to the current Linux coding style convention.
Thus replace the identifier "out" by "unlock".

Signed-off-by: Markus Elfring 
---
 drivers/input/evdev.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 83fcfd6..548874d 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -545,22 +545,21 @@ static ssize_t evdev_write(struct file *file, const char 
__user *buffer,
 
if (!evdev->exist || client->revoked) {
retval = -ENODEV;
-   goto out;
+   goto unlock;
}
 
while (retval + input_event_size() <= count) {
 
if (input_event_from_user(buffer + retval, )) {
retval = -EFAULT;
-   goto out;
+   goto unlock;
}
retval += input_event_size();
 
input_inject_event(>handle,
   event.type, event.code, event.value);
}
-
- out:
+unlock:
mutex_unlock(>mutex);
return retval;
 }
@@ -1292,12 +1291,11 @@ static long evdev_ioctl_handler(struct file *file, 
unsigned int cmd,
 
if (!evdev->exist || client->revoked) {
retval = -ENODEV;
-   goto out;
+   goto unlock;
}
 
retval = evdev_do_ioctl(file, cmd, p, compat_mode);
-
- out:
+unlock:
mutex_unlock(>mutex);
return retval;
 }
-- 
2.10.0