All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] brcm80211: smac: Use kmemdup rather than duplicating its implementation
@ 2011-11-17 22:43 Thomas Meyer
  2011-11-21 18:52 ` Franky Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2011-11-17 22:43 UTC (permalink / raw)
  To: linville, linux-wireless, netdev, linux-kernel

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---

diff -u -p a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 2011-11-07 19:39:05.641131954 +0100
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 2011-11-08 10:44:56.761349456 +0100
@@ -1561,11 +1561,10 @@ int brcms_ucode_init_buf(struct brcms_in
 			if (le32_to_cpu(hdr->idx) == idx) {
 				pdata = wl->fw.fw_bin[i]->data +
 					le32_to_cpu(hdr->offset);
-				*pbuf = kmalloc(len, GFP_ATOMIC);
+				*pbuf = kmemdup(pdata, len, GFP_ATOMIC);
 				if (*pbuf == NULL)
 					goto fail;
 
-				memcpy(*pbuf, pdata, len);
 				return 0;
 			}
 		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] brcm80211: smac: Use kmemdup rather than duplicating its implementation
  2011-11-17 22:43 [PATCH] brcm80211: smac: Use kmemdup rather than duplicating its implementation Thomas Meyer
@ 2011-11-21 18:52 ` Franky Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Franky Lin @ 2011-11-21 18:52 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: linville, linux-wireless, netdev, linux-kernel

On 11/17/2011 02:43 PM, Thomas Meyer wrote:
> The semantic patch that makes this change is available
> in scripts/coccinelle/api/memdup.cocci.
>
> Signed-off-by: Thomas Meyer<thomas@m3y3r.de>
> ---

Thanks Thomas.

Acked-by: Franky Lin <frankyl@broadcom.com>

Franky


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-21 18:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17 22:43 [PATCH] brcm80211: smac: Use kmemdup rather than duplicating its implementation Thomas Meyer
2011-11-21 18:52 ` Franky Lin

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.