Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759812AbcKCWWW (ORCPT ); Thu, 3 Nov 2016 18:22:22 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:35716 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757963AbcKCWWV (ORCPT ); Thu, 3 Nov 2016 18:22:21 -0400 MIME-Version: 1.0 In-Reply-To: References: <1478210059-6091-1-git-send-email-andrew.kanner@gmail.com> From: Andrew Kanner Date: Fri, 4 Nov 2016 01:22:19 +0300 Message-ID: Subject: Re: [PATCH] staging: lustre: fixed shadowed variable in socklnd_cb.c To: "Dilger, Andreas" Cc: "Drokin, Oleg" , James Simmons , Greg Kroah-Hartman , Alexander Viro , "bevans@cray.com" , "bhaktipriya96@gmail.com" , "lustre-devel@lists.lustre.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 760 Lines: 18 2016-11-04 1:12 GMT+03:00 Dilger, Andreas : > On Nov 3, 2016, at 15:54, Andrew Kanner wrote: >> >> Changed variable 'tx' name in local scope >> Fixed: sparse warning: >> socklnd_cb.c:2476:41: warning: symbol 'tx' shadows an earlier one >> socklnd_cb.c:2435:25: originally declared here > > Looking at this more closely (or from a greater distance, hard to say), > the outer-scope "tx" is used only after this inner-scope "tx", so in > fact there is no benefit to having the inner-scope declaration at all. > > Removing it may save a stack variable (depending on how the compiler > optimizes), and shouldn't affect functionality. > > Cheers, Andreas I see, I'll correct it and resend as PATCH v2. Thank you.