From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: rtlwifi: rtl8192cu: remove pointless memcpy Date: Tue, 27 Feb 2018 16:18:17 +0000 (UTC) Message-ID: <20180227161817.C4BD36070A@smtp.codeaurora.org> References: <20180209132531.2755482-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Ping-Ke Shih , Arnd Bergmann , Johannes Berg , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Arnd Bergmann Return-path: In-Reply-To: <20180209132531.2755482-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Arnd Bergmann wrote: > gcc-8 points out that source and destination of the memcpy() are > always the same pointer, so the effect of memcpy() is undefined > here (its arguments must not overlap): > > drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c: In function '_rtl_rx_process': > drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:430:2: error: 'memcpy' source argument is the same as destination [-Werror=restrict] > > Most likely this is harmless, but it's easy to just remove the > line and get rid of the warning. > > Signed-off-by: Arnd Bergmann > Acked-by: Larry Finger Patch applied to wireless-drivers-next.git, thanks. dcdd54c2bcae rtlwifi: rtl8192cu: remove pointless memcpy -- https://patchwork.kernel.org/patch/10208979/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches