From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbdANM2V (ORCPT ); Sat, 14 Jan 2017 07:28:21 -0500 Received: from sym2.noone.org ([178.63.92.236]:48720 "EHLO sym2.noone.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751919AbdANM2T (ORCPT ); Sat, 14 Jan 2017 07:28:19 -0500 Date: Sat, 14 Jan 2017 13:27:40 +0100 From: Tobias Klauser To: Shyam Saini Cc: hariprasad@chelsio.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cxgb4: Remove redundant memset before memcpy Message-ID: <20170114122739.GG1201@distanz.ch> References: <1484356660-19082-1-git-send-email-mayhs11saini@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484356660-19082-1-git-send-email-mayhs11saini@gmail.com> X-Editor: Vi IMproved 7.3 User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-01-14 at 02:17:40 +0100, Shyam Saini wrote: > The region set by the call to memset, immediately overwritten by > the subsequent call to memcpy and thus makes the memset redundant. > > Also remove the memset((&info, 0, sizeof(info)) on line 398 because > info is memcpy()'ed to before being used in the loop and it isn't > used outside of the loop. > > Signed-off-by: Shyam Saini Reviewed-by: Tobias Klauser