Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8468091ybi; Tue, 9 Jul 2019 16:35:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR8dhkcjMnO3/0ekipvMkryKa4PqHEzmMW51eAzlTWQXqpSv8FQdTSYb+w+Qki3rmAY2qh X-Received: by 2002:a17:90a:de02:: with SMTP id m2mr3047288pjv.18.1562715333510; Tue, 09 Jul 2019 16:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562715333; cv=none; d=google.com; s=arc-20160816; b=qZSfALJstjMgqwcdEE0QW7l80boePzGwORjsRsfGFcENJt1I6ocJokuL1xQkTjRhBs 0oafpl12H3lMoYi1e2mihGZ3wZ4vFTtx9mgF7oyH+GazmzrTIrqe+r90BD0w3APdTkyS VHHBzcNs3HEUM0C3+AMEDzzMHeS4tuXxXjHUlHBBR0XcyXdXzC/FNvT53F8Df7HKxzIu g/UviYMEd0wZ4nUa650+a3xhdvLnGRUxxu10XJmaqLogaKvsD/CE6VDRNFsw37UpJGL9 ew1Ry4J5WEXU3LYNPeew3DWC8lxqQSi9CE2lsI9eXqYackKGB+4U80t+boXdq7G0tsp4 i9Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=awoEQfWGapBaj0Tp+LlSdruFxp5j9H2c6orS7eInq0Y=; b=Ei9Me0ijY6XMzCUTR+2zuZptrrzHZxQjRUKCiiPG8cjQVLuK0zInsCnBtU1RkbrVZ/ TnEn9/VobvG4pXTJArD7dIRymsAP84KErjGraRXAcifKmLNEJGSC6sMRXZf0afBa0wUj 8q3YWh7QipXQZH7XwRozwZksm84ukN1itiN9gYuR7RPsKxf8y8qjazkKCvP6NOuS/7eh YeMsIu2xiK20awxwK2wOwqj5XBgnUycn0HqWzrO4sjISo7XqetOUqO72Y5/Oyq93zPpY OmbYurMv3DDMc1qkKm4AMNmUVuoqoeIyT4AYLFx9pg2eN3kTKd2DRxNT0nt1Jer6iw4e lzKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W7h81HWx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb5si334079plb.172.2019.07.09.16.35.18; Tue, 09 Jul 2019 16:35:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W7h81HWx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbfGIXQt (ORCPT + 99 others); Tue, 9 Jul 2019 19:16:49 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36686 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfGIXQt (ORCPT ); Tue, 9 Jul 2019 19:16:49 -0400 Received: by mail-pg1-f195.google.com with SMTP id l21so216606pgm.3 for ; Tue, 09 Jul 2019 16:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=awoEQfWGapBaj0Tp+LlSdruFxp5j9H2c6orS7eInq0Y=; b=W7h81HWxl41Yr3Uga46NxLjRsvpDv4dSeW445Z0IATWZ1bhCnuHT+wpnkG31Xfbxw/ tS6Gm+Qm5Er+pejDfy7o/d/ETBwxS/DGvQwSmRTyYSq3wO/M5XxynHRbB1IYPvDvpn0D dYa0mMCLkFjMerp31H/gmw8kYQQ2oZwb4YHWD59EnYbXANtA3jitC5olNcZ72yKoBcrR 5MkfMzwJkR5pFA5/aLonME/d8CqdyrWNYRsvqps7PlrQrJxnHRjdKraxIF9Qf3VrdJm7 QDPZ6kZOBIXubDhXQvfbajz6lltXo4ZMZKKwWta5BwX1KqnaM9tcMc/jDqP4uAD4hd0J zHjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=awoEQfWGapBaj0Tp+LlSdruFxp5j9H2c6orS7eInq0Y=; b=kq0a4k9CZpofbKbme9coPsgxNKfrwYJjWlhrE9m+iHcaYd3C4WbWQ6A7VnTaHcr2tY OQJVdSBFl2jbS0YG05TblC8lzPjXJ847MsGoIBpnH+TT7VWvneMmEBm4X3e900aNj7yo j+F6l8mcYXvbfLFeNT/Dy34Tf85MlI38LCzK7yjyEMONoG4JKnztLQ9HMF2bkWf+Q1gK 0s7pcsjDFdO31gj4B86yMzq3MdTLaJ9OyPxzMUnIYNyCy241nXx6ed2JpKYnrVrFyto7 TlD+cScu+q0Rd+UvnkvNJMN18XuzgBX2uctiUvH8nlziY9teRqc3K///YFeqxMToGnxi R01Q== X-Gm-Message-State: APjAAAWeSrNpgAgQRtVSBD8Q3fH+JZ46NDJDuybw4AWypD1Djfa51fuO KwvQq0HF8crBfkL1h13VndMh3a42+W4zA86n48W5iw== X-Received: by 2002:a17:90a:bf02:: with SMTP id c2mr2872161pjs.73.1562714208253; Tue, 09 Jul 2019 16:16:48 -0700 (PDT) MIME-Version: 1.0 References: <20190709221312.7089-1-natechancellor@gmail.com> <20190709230552.61842-1-natechancellor@gmail.com> In-Reply-To: <20190709230552.61842-1-natechancellor@gmail.com> From: Nick Desaulniers Date: Tue, 9 Jul 2019 16:16:37 -0700 Message-ID: Subject: Re: [PATCH v2] IB/rdmavt: Fix variable shadowing issue in rvt_create_cq To: Nathan Chancellor Cc: Dennis Dalessandro , Mike Marciniszyn , Doug Ledford , Jason Gunthorpe , Kamenee Arumugam , linux-rdma@vger.kernel.org, LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 9, 2019 at 4:06 PM Nathan Chancellor wrote: > The function scoped err variable is uninitialized when the flow jumps > into the if statement. The if scoped err variable shadows the function > scoped err variable, preventing the err assignments within the if > statement to be reflected at the function level, which will cause > uninitialized use when the goto statements are taken. > > Just remove the if scoped err declaration so that there is only one > copy of the err variable for this function. > > Fixes: 239b0e52d8aa ("IB/hfi1: Move rvt_cq_wc struct into uapi directory") > Link: https://github.com/ClangBuiltLinux/linux/issues/594 > Reviewed-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > > v1 -> v2: > > * Updated the wording of the commit message to use proper terms like > scoping and shadowing, thanks to review from Nick (let me know if the > wording isn't up to snuff). LGTM thanks for following up w/ v2. -- Thanks, ~Nick Desaulniers