netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: Arjan van de Ven <arjan@infradead.org>
Cc: davem@davemloft.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Paul Bolle <pebolle@tiscali.nl>,
	Hansjoerg Lipp <hjlipp@web.de>
Subject: Re: [PATCH 1/2] gigaset: return -ENOSYS for unimplemented functions
Date: Sun, 08 Mar 2009 01:22:28 +0100	[thread overview]
Message-ID: <49B30FC4.5040305@imap.cc> (raw)
In-Reply-To: <20090307142609.2995bb3d@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Am 07.03.2009 23:26 schrieb Arjan van de Ven:
> On Sat,  7 Mar 2009 23:10:57 +0100 (CET)
> Tilman Schmidt <tilman@imap.cc> wrote:
> 
>> From: Paul Bolle <pebolle@tiscali.nl>
>>
>> A number of functions in the usb_gigaset module will return -EINVAL if
>> CONFIG_GIGASET_UNDOCREQ is not set. Make these return -ENOSYS as it's
>> more specific and it might make it easier to see (from userspace) why
>> these functions actually fail.
>>
>> Impact: some error return codes changed
> 
> ENODEV is what would be more appropriate.

Not at all. ENODEV means "no such device", which would be quite wrong.
The device does exist and is in all probability working perfectly fine.
It just doesn't implement that particular ioctl.

> ENOSYS shuoldn't be returned from drivers, only from unimplemented
> system calls!

There's precedent for using ENOSYS for that case, for example in
drivers/char/vt_ioctl.c. But I'm open for other suggestions.

Thanks,
Tilman

-- 
Tilman Schmidt                    E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2009-03-08  0:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 22:10 [PATCH 0/2] gigaset: patches for 2.6.30 Tilman Schmidt
2009-03-07 22:10 ` [PATCH 1/2] gigaset: return -ENOSYS for unimplemented functions Tilman Schmidt
2009-03-07 22:26   ` Arjan van de Ven
2009-03-08  0:22     ` Tilman Schmidt [this message]
2009-03-08  0:35       ` Arjan van de Ven
2009-03-08  0:55         ` Tilman Schmidt
2009-03-08  1:38           ` Arjan van de Ven
2009-03-08 12:26             ` Tilman Schmidt
2009-03-08 15:23   ` [PATCH 1/2 v2] gigaset: return -ENOTTY " Tilman Schmidt
2009-03-10 12:25     ` David Miller
2009-03-07 22:11 ` [PATCH 2/2] gigaset: Kconfig cleanup Tilman Schmidt
2009-03-10 12:25   ` David Miller

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=49B30FC4.5040305@imap.cc \
    --to=tilman@imap.cc \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=hjlipp@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    /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;
as well as URLs for NNTP newsgroup(s).