From patchwork Sun Dec 13 16:07:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 67033 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBDG7obq001080 for ; Sun, 13 Dec 2009 16:07:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753749AbZLMQHs (ORCPT ); Sun, 13 Dec 2009 11:07:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753744AbZLMQHs (ORCPT ); Sun, 13 Dec 2009 11:07:48 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:35974 "HELO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753704AbZLMQHs (ORCPT ); Sun, 13 Dec 2009 11:07:48 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id ABBEB19BB8F; Sun, 13 Dec 2009 17:07:46 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13212-05; Sun, 13 Dec 2009 17:07:45 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 8D01B19BB86; Sun, 13 Dec 2009 17:07:45 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id EDBCB6DFAAF; Sun, 13 Dec 2009 17:03:53 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id 6F25A4815; Sun, 13 Dec 2009 17:07:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 62A384632; Sun, 13 Dec 2009 17:07:45 +0100 (CET) Date: Sun, 13 Dec 2009 17:07:45 +0100 (CET) From: Julia Lawall To: Andreas Schwab Cc: Ivo van Doorn , Gertjan van Wingerde , "John W. Linville" , linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com Subject: Re: [PATCH 5/9] drivers/net/wireless: Correct code taking the size of a pointer In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Virus-Scanned: amavisd-new at diku.dk Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index eb1e1d0..f52b82e 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -2140,8 +2140,8 @@ static void rt2800_get_tkip_seq(struct ieee80211_hw *hw, u8 hw_key_idx, rt2800_register_multiread(rt2x00dev, offset, &iveiv_entry, sizeof(iveiv_entry)); - memcpy(&iveiv_entry.iv[0], iv16, sizeof(iv16)); - memcpy(&iveiv_entry.iv[4], iv32, sizeof(iv32)); + memcpy(iv16, &iveiv_entry.iv[0], sizeof(*iv16)); + memcpy(iv32, &iveiv_entry.iv[4], sizeof(*iv32)); } static int rt2800_set_rts_threshold(struct ieee80211_hw *hw, u32 value)