Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2105316imm; Thu, 11 Oct 2018 05:18:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV61slktjX9h8VtkPFWEdYP/xX+lL2VuX7LQPNF0Rv4PzsecPpYdVy0Xl1229576/jD/O1abb X-Received: by 2002:a63:2503:: with SMTP id l3-v6mr1220300pgl.69.1539260331315; Thu, 11 Oct 2018 05:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539260331; cv=none; d=google.com; s=arc-20160816; b=s9olLCNygDtn0/ZkE9wdiKpntWgzOCHOrnTH2W/JRcPkIWu9rsqFjcWbfOOVa1Fh3y XHt1J1a4QLlIX/royoJRJErKsG5El+z+b2jX7FT7bRd8xRCFW+Eo1EDSBjoEbPadVoqg TZpEOT67l5red84pT7fWZAREKAj2W7VxkKh8ciq70fu0+xNVATMp2Xz+uQGqKeReqJqo t3WQRGRYAs4zerCprnwWBLcHC9NviBzC8GE48n775mTFush+GsEotMOlUk1fduoclgcp 13AehphQFZISjAo5nmmWlYvZsRuq7lfrivWns0WCtZUeQiPhEaAggMq6fdad1P6v/fXd 9r6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ziIw8ctuy2TkYywIRRzA+fSEUsctk5zWiwYeWzZHaI0=; b=QG+2/F5o5tDh8lIXg+jTkQ/KZyCI/OrBy+EXxLzqiNBih79oyrfX3Ls0scNI7EhVfd 2ba3WBkaCvl3d5Q9YK2M/BfDA99MVlPVV39gucT/GXinMXS2q82YTdj3DGZcR/ayKNR7 BXFMG/8zd90BwbtyrGgayQs99wTWXv/i0aLUvcKTbM8SVeP7p6nnuUTebGTXfUQwKAE9 UzmWbuFCutTpsyW+pSCSKNcmdUlJOfK2FR6n4rdBKHKE//INX7EX7bsv/ikKAKSgfMsO r6U4PhP/IH2mLlJzFgbwJ/PT6FE8jXF3TdC3Q1gS5eWzdjW8XYr/SAg7TXvd+4MasP4g Tajg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10-v6si28287221pgc.420.2018.10.11.05.18.28; Thu, 11 Oct 2018 05:18:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbeJKT2w (ORCPT + 99 others); Thu, 11 Oct 2018 15:28:52 -0400 Received: from mga07.intel.com ([134.134.136.100]:38243 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbeJKT2w (ORCPT ); Thu, 11 Oct 2018 15:28:52 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 05:01:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="94293216" Received: from mrahma3x-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.53.109]) by fmsmga002.fm.intel.com with ESMTP; 11 Oct 2018 05:01:41 -0700 Date: Thu, 11 Oct 2018 15:01:40 +0300 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: "Gustavo A. R. Silva" , Tomas Winkler , Peter Huewe , Arnd Bergmann , Greg Kroah-Hartman , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tpm: fix unused-value issues in tpm_try_transmit Message-ID: <20181011120140.GA15767@linux.intel.com> References: <20181010133817.GA11485@embeddedor.com> <20181010140638.GA3894@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181010140638.GA3894@ziepe.ca> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 08:06:38AM -0600, Jason Gunthorpe wrote: > On Wed, Oct 10, 2018 at 03:38:17PM +0200, Gustavo A. R. Silva wrote: > > Currently, there are some values assigned to variable *rc*, which > > are never actually used in any computation, because such variable > > is updated at line 550, before they can be used: > > > > 549out: > > 550 rc = tpm_go_idle(chip, flags); > > 551 if (rc) > > 552 goto out; > > > > Fix this by removing such assignments. > > Should this be done by not quashing rc during the error unwind rather > than dropping the errors? Yeah.` Wondering if tpm_go_idle() should simply be a void-function i.e. issue just a warning inside (disclaimer: did not revisit its code when writing this). > Jason /Jarkko