lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 13 Jul 2017 09:06:55 +0200
From:   Frans Klaver <fransklaver@...il.com>
To:     Yves Lemée <yves.lemee.kernel@...il.com>
Cc:     mchehab@...nel.org, driverdevel <devel@...verdev.osuosl.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-media@...r.kernel.org
Subject: Re: [PATCH v2] [media] lirc_zilog: Clean up lirc zilog error codes

Almost there on the subject. Stuff between brackets is removed by git,
so you should rather use something like

[PATCH v2] staging: lirc: Clean up zilog error codes

On Wed, Jul 12, 2017 at 9:17 PM, Yves Lemée <yves.lemee.kernel@...il.com> wrote:
> According the coding style guidelines, the ENOSYS error code must be returned
> in case of a non existent system call. This code has been replaced with
> the ENOTTY error code indicating a missing functionality.
>
> v2: Improved punctuation
>     Fixed patch subject

This change info goes below the --- line and just above the diffstat.


> Signed-off-by: Yves Lemée <yves.lemee.kernel@...il.com>
> ---
>  drivers/staging/media/lirc/lirc_zilog.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c
> index 015e41bd036e..26dd32d5b5b2 100644
> --- a/drivers/staging/media/lirc/lirc_zilog.c
> +++ b/drivers/staging/media/lirc/lirc_zilog.c
> @@ -1249,7 +1249,7 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
>                 break;
>         case LIRC_GET_REC_MODE:
>                 if (!(features & LIRC_CAN_REC_MASK))
> -                       return -ENOSYS;
> +                       return -ENOTTY;
>
>                 result = put_user(LIRC_REC2MODE
>                                   (features & LIRC_CAN_REC_MASK),
> @@ -1257,21 +1257,21 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
>                 break;
>         case LIRC_SET_REC_MODE:
>                 if (!(features & LIRC_CAN_REC_MASK))
> -                       return -ENOSYS;
> +                       return -ENOTTY;
>
>                 result = get_user(mode, uptr);
>                 if (!result && !(LIRC_MODE2REC(mode) & features))
> -                       result = -EINVAL;
> +                       result = -ENOTTY;
>                 break;
>         case LIRC_GET_SEND_MODE:
>                 if (!(features & LIRC_CAN_SEND_MASK))
> -                       return -ENOSYS;
> +                       return -ENOTTY;
>
>                 result = put_user(LIRC_MODE_PULSE, uptr);
>                 break;
>         case LIRC_SET_SEND_MODE:
>                 if (!(features & LIRC_CAN_SEND_MASK))
> -                       return -ENOSYS;
> +                       return -ENOTTY;
>
>                 result = get_user(mode, uptr);
>                 if (!result && mode != LIRC_MODE_PULSE)
> --
> 2.13.2
>
> _______________________________________________
> devel mailing list
> devel@...uxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ