Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH V3.8 5/5] rtlwifi: rtl8723ae: Fix warning for unchecked pci_map_single() call
Date: Wed, 26 Dec 2012 15:13:51 -0800	[thread overview]
Message-ID: <1356563631.30414.3.camel@edumazet-glaptop> (raw)
In-Reply-To: <1356559691-5048-6-git-send-email-Larry.Finger@lwfinger.net>

On Wed, 2012-12-26 at 16:08 -0600, Larry Finger wrote:
> Kernel 3.8 implements checking of all DMA mapping calls and issues
> a WARNING for the first it finds that is not checked.
> 
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>  drivers/net/wireless/rtlwifi/rtl8723ae/trx.c |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
> index 87331d8..7ddd517 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
> @@ -387,6 +387,12 @@ void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw,
>  					    PCI_DMA_TODEVICE);
>  	u8 bw_40 = 0;
>  
> +	if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
> +		RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
> +			 "DMA mapping error");
> +		return;
> +	}
> +	CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE);
>  	if (mac->opmode == NL80211_IFTYPE_STATION) {
>  		bw_40 = mac->bw_40;
>  	} else if (mac->opmode == NL80211_IFTYPE_AP ||
> @@ -542,6 +548,12 @@ void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw,
>  					    PCI_DMA_TODEVICE);
>  	__le16 fc = hdr->frame_control;
>  
> +	if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
> +		RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
> +			 "DMA mapping error");
> +		return;
> +	}
> +	CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE);
>  	CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE);
>  
>  	if (firstseg)

This seems wrong... 

CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE) doesnt need to be done
twice, does it ?

  reply	other threads:[~2012-12-26 23:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-26 22:08 [PATCH V3.8 0/5] Fixes for WARNINGS due to unchecked DMA mapping calls Larry Finger
2012-12-26 22:08 ` [PATCH V3.8 1/5] rtlwifi: Fix warning for unchecked pci_map_single() call Larry Finger
2012-12-26 22:08 ` [PATCH V3.8 2/5] rtlwifi: rtl8192ce: " Larry Finger
2012-12-26 22:08 ` [PATCH V3.8 3/5] rtlwifi: rtl8192de: " Larry Finger
     [not found] ` <1356559691-5048-1-git-send-email-Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2012-12-26 22:08   ` [PATCH V3.8 4/5] rtlwifi: rtl8192se: " Larry Finger
2012-12-26 22:08 ` [PATCH V3.8 5/5] rtlwifi: rtl8723ae: " Larry Finger
2012-12-26 23:13   ` Eric Dumazet [this message]
2012-12-26 23:17     ` Larry Finger

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=1356563631.30414.3.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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