Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp815470imm; Wed, 19 Sep 2018 07:21:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYh9mW1j/56PYCpGfhTbpF1MpdX/6PLI+wXI59XXueg0f+PlPbrMKiYEPS3/Zid4fe4SH90 X-Received: by 2002:a63:a06:: with SMTP id 6-v6mr33618604pgk.318.1537366891763; Wed, 19 Sep 2018 07:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537366891; cv=none; d=google.com; s=arc-20160816; b=LwtMYxFJn21jpzu8oucwvAfIE5s99zq/w71nmX8XRu/3nzzeEGzjdHwzm43MLGowoq 5VNwhwEcf8kCl0gyhQh+uW+0HbKBlS1mC1nTg0719EgaJJCZXKJ/2jxfsXGzUjnmqbba 6uKavEK50xX9bP9HpECFdplsImqO+wRoR+gc257a9zYOeDz8BaKzU7T9qHjKm2bgL0T9 2IQV14HvVOon8kyzfTcwPOj1qPrQWUmjUYXOFK1PI+81CDLSy/ngccdwAlasAt9x4a8h eqLqJQ+csaSa08GRJtlO+W2pWALJJfSKAyoEY1+qs0D02gSO7vq7jY4LgGK9YymkV+1b et8w== 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=isC0venleNOC/cQdchtueXFXI9q1Jra2sYPD3cT2eyg=; b=VkOqPr8es17MCsD5v0xmGzBpd7zVL/GEhO1JJjMbvKZbQHsYipQYCcwJk1kduMxPkf 8KYL+YvbyCmUUDPanFkfrr9eM8PWmF6o3HSMno3x4qUJebiOmqH1iMKDAJHhMGt9i2UL O4MPPYtGN/lv3FCVenVCrUXWgWr3GTnrstzZQpkoa4mCzX9iQCs0fxMY1smnsPSzVlv3 0/wk4dGvjGDbP+iDjvC96pFt+8HlTPGjq5CAC1YpYxIjbszYFykt4+Bic9paHPqf/uis dZkhZjsaAbZh3L15wJ8MwBjoeSX9JXHgArXyiQX0vkqZUPt8kV6ZlJZPPD9DJ3E5O2Ar Z8mw== 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 g12-v6si19859898pgk.636.2018.09.19.07.21.15; Wed, 19 Sep 2018 07:21:31 -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 S1731797AbeISTlE (ORCPT + 99 others); Wed, 19 Sep 2018 15:41:04 -0400 Received: from mga11.intel.com ([192.55.52.93]:58620 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727772AbeISTlE (ORCPT ); Wed, 19 Sep 2018 15:41:04 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 07:02:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,394,1531810800"; d="scan'208";a="75602296" Received: from pqueiros-mobl.ger.corp.intel.com (HELO localhost) ([10.249.37.13]) by orsmga006.jf.intel.com with ESMTP; 19 Sep 2018 07:02:55 -0700 Date: Wed, 19 Sep 2018 17:02:54 +0300 From: Jarkko Sakkinen To: Tomas Winkler Cc: Jason Gunthorpe , Alexander Usyskin , Tadeusz Struk , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 04/20] tpm: add tpm_calc_ordinal_duration wrapper Message-ID: <20180919140254.GG26571@linux.intel.com> References: <20180918093459.19165-1-tomas.winkler@intel.com> <20180918093459.19165-5-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918093459.19165-5-tomas.winkler@intel.com> 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 Tue, Sep 18, 2018 at 12:34:43PM +0300, Tomas Winkler wrote: > Add convenient wrapper for ordinal duration computation > to remove boiler plate if else statement over TPM2. > > if (chip->flags & TPM_CHIP_FLAG_TPM2) > tpm2_calc_ordinal_duration(chip, ordinal); > else > tpm1_calc_ordinal_duration(chip, ordinal); > > Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen /Jarkko