From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai 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: Wed, 10 Jun 2015 12:35:20 +0200 Message-ID: References: <1433466312-31444-1-git-send-email-agoode@google.com> <557146C5.90209@ladisch.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id B582D265947 for ; Wed, 10 Jun 2015 12:35:20 +0200 (CEST) In-Reply-To: <557146C5.90209@ladisch.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Clemens Ladisch Cc: Adam Goode , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 05 Jun 2015 08:50:45 +0200, Clemens Ladisch wrote: > > 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. Agreed. Also, please don't include irrelevant changes in configure.ac. thanks, Takashi