Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp963954imm; Wed, 10 Oct 2018 07:07:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Kx49HjxL/58ADRwMZhxBqYJbC9D3Iqq9A7PM6W+9qj9F8gr6jyhF/Ztoh1QelQCKb+nfn X-Received: by 2002:a17:902:2f84:: with SMTP id t4-v6mr33751988plb.87.1539180447144; Wed, 10 Oct 2018 07:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539180447; cv=none; d=google.com; s=arc-20160816; b=F6f27pG9LpaiePzqdXuWTumYq8Sa1NJvKEcXzC4LP0JkCeqEQoPC2hrCyv5gryTMOK Zklp4aZR7rxsxQ/BNxZc5e0jxkrtiCPRpIRKXt1G7NVpRnw1/yx3Iwj6/XGrWoT+bfad Ud8Kn6Swxk9nwK01Qo523I0ajkkFT41LUBzOUFCUAvyNDxKWzXewJTbW4Q3jJA7LgJwC S3IKBjE9gsk6giMkhdeVz46Md2Z9pfygddI3t/lYGSp6U01Wgk0fKBx9qGEY1Ezdrwbg ePIiH6SAxVnArwMgTK5jrKPMRBNL/a1U9yDz727SymYv0sAU2pxuLq0Y+SRNklGco+Ec pSHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uGyx9ee2MgBE3ANC+X4D2hwWA6j0A4+rtNyUpD4jAos=; b=OHcRpV488a051Z5qHq5CaykPcDRvtkjZDvISXii479QJIJGo0OpVbb6gHtONJTEzPo Qg/jUZUb7jKBqKsTB/uAjYRS1W2t4Fd0MImSKsrwx/L8tWYZXjZnNbQRfcs/WoUYlXhI TwPBjUz0eLAE6BaaPVdeQNfTGIokHlSuGhsHdwDig7QzjlidrSaiX0PaIPJHc4f/NojJ fKF4F4hb18P6ZJzJBfLk4J1tap+AfxY8pcCNw07pAta56V1b95CkC5IvNuoNRlzxGV6A lLnwnJHZ4yp8aaTkst+mfQwu0HIpfzy0TXJnGmPNRXslw1LgitUiSv1PTwWEYpEMhFMK w5fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=XMKHydtv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74-v6si20257362pge.31.2018.10.10.07.07.11; Wed, 10 Oct 2018 07:07:27 -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=@ziepe.ca header.s=google header.b=XMKHydtv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726984AbeJJV3B (ORCPT + 99 others); Wed, 10 Oct 2018 17:29:01 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:40445 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbeJJV3B (ORCPT ); Wed, 10 Oct 2018 17:29:01 -0400 Received: by mail-qt1-f193.google.com with SMTP id b4-v6so5732496qtc.7 for ; Wed, 10 Oct 2018 07:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uGyx9ee2MgBE3ANC+X4D2hwWA6j0A4+rtNyUpD4jAos=; b=XMKHydtvXllcC3YBxm0LDIGgw8evthxqTjxtykffLLIOhchIX9dUCaLkpwtYOYpRYh A6PbUmsBIXi2dMRHoeHxGDkzbc5IXOsy7vtq5ARbpZFzSzasDDxu9xnxLrT9j5U3hxtp CVuOqKVwaJWZTaP292Iq7s844wEOszeTMZWY+cnAH1TJWK3Gozn9ROyRrRZcxeR9GAIL bHjjSl+I18d1t7qbmEx5h0CRIRrL51kIccZ2gqdgyECRqcO/yhp9LzQlqwhFBLvQ8GvK gwfOLgnMybLaBXPKkoBt9I+qYu3KcQN84WEqv6waPpcUnCQmHhMFSyMue3nMSQGryioM bsHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uGyx9ee2MgBE3ANC+X4D2hwWA6j0A4+rtNyUpD4jAos=; b=eD4He400oh3OnEZRajoTVlJaI0Wj1+e1zfbFtLEEIUnB8ZQpUQ5FecaKgnxGZkX/HI 7lRHwnZb2kYPVCdCj/KS3rDtUZ94MCeJSidtsmjtfRfP1T/aJUtGAxhaR3ZRZ1YSvMp9 u7QxsrwpVXGOfVp+7nZ/zVE755nvBt/2qvibM+NVvO3FQzz7/zPWo+j24kMYgfQk5Q7p BwirOJ4sYcYdSIlT+zGJ3W0ig9Z548Gosl01kvY5dV5XW0vz3Xuv2e14Jeh0HpfoXc4w //VUFb6PTQa803iJAbUWEc+xHYtVD+9yY9UmAo0Kzv74MskfA7HVsX4PZao3X03NVwmT hNwg== X-Gm-Message-State: ABuFfoi8h0QcbYrSZHH9HoyzAf7YsUNSXvrQSxM66Y0lVnD3ZqHQAdkW ipV75N1kD5jMXTfKh268ugE/xA== X-Received: by 2002:aed:3d4e:: with SMTP id h14-v6mr27272521qtf.222.1539180400365; Wed, 10 Oct 2018 07:06:40 -0700 (PDT) Received: from ziepe.ca ([66.187.232.66]) by smtp.gmail.com with ESMTPSA id p3-v6sm7977208qtp.55.2018.10.10.07.06.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 07:06:39 -0700 (PDT) Received: from jgg by jggl.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gAF8I-00015l-5i; Wed, 10 Oct 2018 08:06:38 -0600 Date: Wed, 10 Oct 2018 08:06:38 -0600 From: Jason Gunthorpe To: "Gustavo A. R. Silva" Cc: Tomas Winkler , Peter Huewe , Jarkko Sakkinen , 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: <20181010140638.GA3894@ziepe.ca> References: <20181010133817.GA11485@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181010133817.GA11485@embeddedor.com> 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 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? Jason