Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752985AbbHCGl0 (ORCPT ); Mon, 3 Aug 2015 02:41:26 -0400 Received: from mga03.intel.com ([134.134.136.65]:46125 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752750AbbHCGlY convert rfc822-to-8bit (ORCPT ); Mon, 3 Aug 2015 02:41:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,599,1432623600"; d="scan'208";a="618069501" From: "Drokin, Oleg" To: Greg Kroah-Hartman , Shraddha Barke CC: Al Viro , Julia Lawall , aybuke ozdemir , "Dilger, Andreas" , "Hammond, John" , "Frank Zago" , "HPDD-discuss@lists.01.org" , " SUBSYSTEM" , Linux Kernel Mailing List Subject: Re: about ENOSYS Thread-Topic: about ENOSYS Thread-Index: AQHQzbRhgcdT66mgXE6ebTy6+h62t536SMIA Date: Mon, 3 Aug 2015 06:41:22 +0000 Message-ID: References: <1438582739-2626-1-git-send-email-shraddha.6596@gmail.com> In-Reply-To: <1438582739-2626-1-git-send-email-shraddha.6596@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.50.188] Content-Type: text/plain; charset="Windows-1252" Content-ID: <2F349A1B6BFA1D4B88419BC6AE69A959@intel.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2172 Lines: 62 subject have been missing, so I filled in something. On Aug 3, 2015, at 2:18 AM, Shraddha Barke wrote: > From b67c6c20455b04b77447ab4561e44f1a75dd978d Mon Sep 17 00:00:00 2001 > From: Shraddha Barke > Date: Mon, 3 Aug 2015 11:34:19 +0530 > Subject: [PATCH] Staging : lustre : Use -EINVAL instead of -ENOSYS > > ENOSYS means that a nonexistent system call was called. This should > not be used for invalid operations on otherwise valid syscalls. > > Use -EINVAL instead of -ENOSYS. This fixes checkpatch warning message: > > WARNING: ENOSYS means 'invalid syscall nr' and nothing else Is this really true, though? I know you are working off what the tool reports. But in reality people have been using ENOSYS to indicate "this thing that you want is not really available" Reading the define file we can see: /usr/include/asm-generic/errno.h:#define ENOSYS 38 /* Function not implemented */ $ grep -r 'ENOSYS;' fs/ | wc -l 75 So it's extensively used in the fs tree by existing code. Hmm?. Searching some more I arrived at commit e15f431f that changes the in-kernel comment and claims the "system call only stuff". So Greg, do you want Lustre to get rid of use of ENOSYS (all 16 users we have), or is it ok to leave them in? > > Signed-off-by: Shraddha Barke > --- > drivers/staging/lustre/lustre/llite/file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c > index 2c467bf..93619a8 100644 > --- a/drivers/staging/lustre/lustre/llite/file.c > +++ b/drivers/staging/lustre/lustre/llite/file.c > @@ -2786,7 +2786,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) > static int > ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock) > { > - return -ENOSYS; > + return -EINVAL; > } > > /** > -- > 2.1.0 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/