From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 381BB329C53 for ; Mon, 17 Nov 2025 11:31:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763379076; cv=none; b=e9JsAjf81/lzK9RytHQS1SdY3KKmRRXlWdWsk8xdnTmSWl4gy0gc/NCKI5K4d9WKF2asz3k4mSCjMFtKFMGsg6YlSF8a69ZdUVHXds3RKA/KfJ+D4CWtZllvSF/J0dBjLSy9x7CE1Ssrgcl+PmYgaK7mDrS2AirqQI2VEj6Fu1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763379076; c=relaxed/simple; bh=ghOn5aauEkpeyknxTL4CgQV3cP6rV0xcInBs2JfaoUk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z7nIQtyYhw2PXt/2a+edOhwpC1H5Ww/qAhw0hwdKX2l7VBJpWiY/YgmsfIhYTdfxTeeL9bb5suqAgpql8kzaE0+1oUgI6cv/JERcfqEjqBdcWrf7INinvt0Qc75g5Yo2stSnSRMXSPrZ2bp2PPh0LIW9PSHZqTPtD8HeD9j+pug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=eNEWDzBp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=v2gdH2dZ; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="eNEWDzBp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="v2gdH2dZ" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 08F2214000D3; Mon, 17 Nov 2025 06:31:12 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 17 Nov 2025 06:31:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1763379072; x= 1763465472; bh=Od/LzLdNDLGB9BaWnjY2NsLBwJgTXzPdpv02meqtZL8=; b=e NEWDzBpnsvJT+o5L9OSIk7t0Yy5mfR/78nWkjOS2KKA8ACtwf0Pfg1rX+PuUWTir w/XynM07ikaQgWHmUQQe7qOl3EnGboheRXD+kh9lssNb4K4cRy/jQdwooiKVjubz 9kG9sxbp6SYXAUvBTz+G9+xdV984gRVxWsQ7t8XE6Na+7s//+Gyt+KkBODoCR3xN xyCHnYZkERD1T1JLVqG++TETFqGzjVUS6bCJMIIXtiE4UGS3MY5eX1c1whEZqnqo v2Nu8xvxqFY09Ac69AAzb5MB/zb0m0qe4XUGE/blEPplvzTvBW9TtrmcZ2OBw/j1 baDZlVXGI/wm4qk+/ND/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1763379072; x=1763465472; bh=Od/LzLdNDLGB9BaWnjY2NsLBwJgTXzPdpv0 2meqtZL8=; b=v2gdH2dZGiqIIDuCKd6o30bhBgJ3PaxKZBiFG6jOOAkblHN9b6h odKEhqrOBq9SrZgksH6jz7O6NnaNUZuj+WPLOdEIulRotIFJsx4LtnjDqTKqjqC2 6JdwHsWARYULBXkpI2zx4Nb2tNGfa8KvICCtpMtk9D14VVIA51AJqCoQgjaoaqXE 8h+GLq4H4LQJbYHYvJ+vmFczgzew2/PDrnhHwv/jtia90czs3xA0qZdGbKZNsRrB TO7eRMVNFlIy1WhXfpvOEsjZ8AJAQHSCsjuYzFxq7CjfXVOESaUI3BXTyreoRx4R du5oNoHgJxpkywVyEkIK/LaWl/VHUHo0pfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvudekfeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttdertd dttddvnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpeehhffhteetgf ekvdeiueffveevueeftdelhfejieeitedvleeftdfgfeeuudekueenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhppdhnsggprhgtphhtthhopeeipdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehnihhrsghhrgihrdhlkhgusehgmhgrihhlrdgtohhmpdhrtghpth htoheplhhinhhugidufeelgedquggvvhgvlheslhhishhtshdrshhouhhrtggvfhhorhhg vgdrnhgvthdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehskhhhrghnsehlihhnuhigfhhouhhnuggrthhiohhn rdhorhhgpdhrtghpthhtohepuggrvhhiugdrhhhunhhtvghrrdhlihhnuhigsehgmhgrih hlrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlqdhmvghnthgvvghssehl ihhsthhsrdhlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Nov 2025 06:31:09 -0500 (EST) Date: Mon, 17 Nov 2025 20:31:07 +0900 From: Takashi Sakamoto To: Nirbhay Sharma Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, david.hunter.linux@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH] firewire: Replace ENOSYS with appropriate error codes Message-ID: <20251117113107.GA663208@workstation.local> Mail-Followup-To: Nirbhay Sharma , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, david.hunter.linux@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org References: <20251117110901.686828-1-nirbhay.lkd@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251117110901.686828-1-nirbhay.lkd@gmail.com> Hi, On Mon, Nov 17, 2025 at 04:39:01PM +0530, Nirbhay Sharma wrote: > ENOSYS is reserved for "invalid syscall number" and should not be used > for other error conditions. Replace incorrect usages with more > appropriate error codes: Yes. The newly-written code should not use ENOSYS for cadual use, indeed. > - In sbp2.c: Use -EOPNOTSUPP for unsupported operation (re-adding > logical units via SCSI stack). > > - In ohci.c: Use -EINVAL for invalid ISO context types in switch > statements, and -EOPNOTSUPP for unsupported Pinnacle MovieBoard > hardware. > > - In core-cdev.c: Use -EACCES for access policy violations when > operations are restricted to local nodes' device files. > > Signed-off-by: Nirbhay Sharma > --- > drivers/firewire/core-cdev.c | 6 +++--- > drivers/firewire/ohci.c | 8 ++++---- > drivers/firewire/sbp2.c | 2 +- > 3 files changed, 8 insertions(+), 8 deletions(-) There is a rest to discuss when changing existing code in respect to this topic, since it brings loss of backward-compatibility to userspace software. In this reason, I've left them as is. If there are any strong and specific reasons to correct them, let us change them. Do you have such reasons? For example, Linux kernel developer have shared the consensus and decision to ostracize such codes? Thanks Takashi Sakamoto