From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Nirbhay Sharma <nirbhay.lkd@gmail.com>
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
Date: Mon, 17 Nov 2025 20:31:07 +0900 [thread overview]
Message-ID: <20251117113107.GA663208@workstation.local> (raw)
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 <nirbhay.lkd@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2025-11-17 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 11:09 [PATCH] firewire: Replace ENOSYS with appropriate error codes Nirbhay Sharma
2025-11-17 11:31 ` Takashi Sakamoto [this message]
2025-11-19 4:51 ` Nirbhay Sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251117113107.GA663208@workstation.local \
--to=o-takashi@sakamocchi.jp \
--cc=david.hunter.linux@gmail.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=nirbhay.lkd@gmail.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox