linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Desnes Augusto Nunes do Rosário" <desnesn@linux.vnet.ibm.com>
To: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, tlfalcon@linux.vnet.ibm.com,
	nfont@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com
Subject: Re: [PATCH] [net-next,v2] ibmvnic: fix dma_mapping_error call
Date: Thu, 16 Nov 2017 17:53:20 -0200	[thread overview]
Message-ID: <22ff4956-84b4-ed2d-8fa2-2ed3c4333796@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171116183323.21961-1-desnesn@linux.vnet.ibm.com>

First of all, I apologize for sending this patch to net-next!

Since this is a fix, it should had been sent to the regular net tree, 
which I'll do now with the proper fixes tag. My mistake!

Thanks for understanding and please discard this one.

On 11/16/2017 04:33 PM, Desnes Augusto Nunes do Rosario wrote:
> This patch fixes the dma_mapping_error call to use the correct dma_addr
> which is inside the ibmvnic_vpd struct. Moreover, it fixes a uninitialized
>   warning for the local dma_addr.
> 
> Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.vnet.ibm.com>
> ---
>   drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
> index 04aaacb..1dc4aef 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -849,7 +849,6 @@ static int ibmvnic_get_vpd(struct ibmvnic_adapter *adapter)
>   {
>   	struct device *dev = &adapter->vdev->dev;
>   	union ibmvnic_crq crq;
> -	dma_addr_t dma_addr;
>   	int len = 0;
> 
>   	if (adapter->vpd->buff)
> @@ -879,7 +878,7 @@ static int ibmvnic_get_vpd(struct ibmvnic_adapter *adapter)
>   	adapter->vpd->dma_addr =
>   		dma_map_single(dev, adapter->vpd->buff, adapter->vpd->len,
>   			       DMA_FROM_DEVICE);
> -	if (dma_mapping_error(dev, dma_addr)) {
> +	if (dma_mapping_error(dev, adapter->vpd->dma_addr)) {
>   		dev_err(dev, "Could not map VPD buffer\n");
>   		kfree(adapter->vpd->buff);
>   		return -ENOMEM;
> 

-- 
Desnes Augusto Nunes do Rosário
------------------------------------------

Linux Developer - IBM / Brazil
M.Sc. in Electrical and Computer Engineering - UFRN

(11) 9595-30-900
desnesn@br.ibm.com

      reply	other threads:[~2017-11-16 19:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 18:33 [PATCH] [net-next,v2] ibmvnic: fix dma_mapping_error call Desnes Augusto Nunes do Rosario
2017-11-16 19:53 ` Desnes Augusto Nunes do Rosário [this message]

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=22ff4956-84b4-ed2d-8fa2-2ed3c4333796@linux.vnet.ibm.com \
    --to=desnesn@linux.vnet.ibm.com \
    --cc=jallen@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=tlfalcon@linux.vnet.ibm.com \
    /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).