Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751273AbdGMHeG (ORCPT ); Thu, 13 Jul 2017 03:34:06 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:33121 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877AbdGMHeE (ORCPT ); Thu, 13 Jul 2017 03:34:04 -0400 MIME-Version: 1.0 In-Reply-To: <20170712191737.umbzyw6osz76yv3c@yves> References: <20170712191737.umbzyw6osz76yv3c@yves> From: Frans Klaver Date: Thu, 13 Jul 2017 09:06:55 +0200 Message-ID: Subject: Re: [PATCH v2] [media] lirc_zilog: Clean up lirc zilog error codes To: =?UTF-8?Q?Yves_Lem=C3=A9e?= Cc: mchehab@kernel.org, driverdevel , Greg KH , "linux-kernel@vger.kernel.org" , linux-media@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v6D7YBIc031665 Content-Length: 2689 Lines: 67 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 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 > --- > 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@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel