public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Eliot Blennerhassett <eblennerhassett@audioscience.com>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
Date: Wed, 28 Mar 2012 14:38:51 +0000	[thread overview]
Message-ID: <s5hiphoyemc.wl%tiwai@suse.de> (raw)
In-Reply-To: <20120328065702.GA9113@elgon.mountain>

At Wed, 28 Mar 2012 09:57:02 +0300,
Dan Carpenter wrote:
> 
> This function returns zero or -ENOMEM, but because it's type is u16, the
> -ENOMEM gets changed to 65524.  None of the callers care, but lets fix
> it anyway as a cleanup.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied it now.  Thanks.


Takashi


> diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
> index 4cc315d..8c63200 100644
> --- a/sound/pci/asihpi/hpi_internal.h
> +++ b/sound/pci/asihpi/hpi_internal.h
> @@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned.
>  If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and
>  HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle.
>  */
> -u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
> +int hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
>  							   /**< memory handle */
>  	u32 size, /**< Size in bytes to allocate */
>  	struct pci_dev *p_os_reference
> diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c
> index 2d7d1c2..87f4385 100644
> --- a/sound/pci/asihpi/hpios.c
> +++ b/sound/pci/asihpi/hpios.c
> @@ -43,7 +43,7 @@ void hpios_delay_micro_seconds(u32 num_micro_sec)
>  
>  On error, return -ENOMEM, and *pMemArea.size = 0
>  */
> -u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
> +int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
>  	struct pci_dev *pdev)
>  {
>  	/*?? any benefit in using managed dmam_alloc_coherent? */
> 

  reply	other threads:[~2012-03-28 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28  6:57 [patch] ALSA: asihpi - fix return type of hpios_locked_mem_alloc() Dan Carpenter
2012-03-28 14:38 ` Takashi Iwai [this message]
2012-03-28 21:43 ` Eliot Blennerhassett
2012-03-29  5:33   ` Takashi Iwai
2012-03-29  5:56     ` Dan Carpenter
2012-03-29 20:52     ` [PATCH] ALSA: asihpi - fix return value " linux
2012-03-30 14:25       ` Takashi Iwai

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=s5hiphoyemc.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dan.carpenter@oracle.com \
    --cc=eblennerhassett@audioscience.com \
    --cc=kernel-janitors@vger.kernel.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