Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753827AbbHCQV7 (ORCPT ); Mon, 3 Aug 2015 12:21:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60119 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbbHCQV6 (ORCPT ); Mon, 3 Aug 2015 12:21:58 -0400 Date: Mon, 3 Aug 2015 09:21:58 -0700 From: Greg Kroah-Hartman To: "Drokin, Oleg" Cc: Shraddha Barke , " SUBSYSTEM" , "Dilger, Andreas" , Linux Kernel Mailing List , "HPDD-discuss@lists.01.org" , Julia Lawall , Al Viro , "Hammond, John" , Frank Zago Subject: Re: about ENOSYS Message-ID: <20150803162158.GA30867@kroah.com> References: <1438582739-2626-1-git-send-email-shraddha.6596@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1670 Lines: 41 On Mon, Aug 03, 2015 at 06:41:22AM +0000, Drokin, Oleg wrote: > 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? For now I'd just leave it as-is. -- 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/