All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Adam Goode <agoode@google.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH - alsa-lib 1/1] Introduce	snd_seq_client_info_get_card_number, for getting the card number of a seq client on recent kernels
Date: Fri, 05 Jun 2015 08:50:45 +0200	[thread overview]
Message-ID: <557146C5.90209@ladisch.de> (raw)
In-Reply-To: <1433466312-31444-1-git-send-email-agoode@google.com>

Adam Goode wrote:
>  /**
> + * \brief Get the card number of a client_info container
> + * \param info client_info container
> + * \return the card number, -1 if no card associated with this client, or -ENOSYS if the
> + *         kernel does not support reporting this field
> + */

-1 is used as an out-of-range value when enumerating cards.  However,
I don't think this convention can be applied here, because the return
value is also used for error codes, and -1 would correspond to -EPERM.

Squashing all error codes into -1 is not a good idea, so I think the
value -1 should be converted into an appropriate error code, probably
-ENXIO.


Regards,
Clemens

  reply	other threads:[~2015-06-05  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05  1:05 [PATCH - alsa-lib 1/1] Introduce snd_seq_client_info_get_card_number, for getting the card number of a seq client on recent kernels Adam Goode
2015-06-05  6:50 ` Clemens Ladisch [this message]
2015-06-10 10:35   ` Takashi Iwai
2015-06-10 17:09     ` Adam Goode

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=557146C5.90209@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=agoode@google.com \
    --cc=alsa-devel@alsa-project.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.