All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliot Blennerhassett <linux@audioscience.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: asihpi - Clarify adapter index validity check.
Date: Fri, 29 Jul 2011 10:14:26 +1200	[thread overview]
Message-ID: <4E31DF42.3050000@audioscience.com> (raw)
In-Reply-To: <s5h62mn6juz.wl%tiwai@suse.de>

On 28/07/11 17:43, Takashi Iwai wrote:
		if ((adapter >= HPI_MAX_ADAPTERS) || (!pa->type)) {
>> -			hpi_init_response(&hr->r0, HPI_OBJ_ADAPTER,
>> -				HPI_ADAPTER_OPEN,
>> -				HPI_ERROR_BAD_ADAPTER_NUMBER);
>> +		if (!adapter_present) {
>> +			hpi_init_response(&hr->r0, hm->h.object,
>> +				hm->h.function, HPI_ERROR_BAD_ADAPTER_NUMBER);
> 
> Here you are initializing to different values (from HPI_OBJ_ADAPTER to
> hm->h.object, etc).  Is it intentional?

Yes it is. It is so the error response reflects the parameters of the
corresponding message.   It makes for better error logging in userspace.

I can redo the patch with better commit log if you like.
Adding "Correct error response to reflect message object/function ids"


-- 
Eliot Blennerhassett
AudioScience Inc.

  reply	other threads:[~2011-07-28 22:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 21:50 [PATCH] ALSA: asihpi - Clarify adapter index validity check linux
2011-07-28  5:43 ` Takashi Iwai
2011-07-28 22:14   ` Eliot Blennerhassett [this message]
2011-07-29  5:30     ` Takashi Iwai
2011-08-01 21:44       ` linux

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=4E31DF42.3050000@audioscience.com \
    --to=linux@audioscience.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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.