Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4453626ybi; Tue, 11 Jun 2019 06:58:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4ZSuOxaKCZnboJt62Fb+42UiTYPqpaVElWJkpeLM/4p2fC7GXERvoE+DY3jCJNgRq7W+V X-Received: by 2002:a17:902:6902:: with SMTP id j2mr3713022plk.321.1560261529383; Tue, 11 Jun 2019 06:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560261529; cv=none; d=google.com; s=arc-20160816; b=Tu4OVMlvmR2jBdMbTsVdqmK4v3kUyN1XPgOdHYHPUupJ+hhkSqjUTTlkQIAz8ngbqI nkl+FYIA2zz21Z8wcgxuCcqH5Wz5GwKht2Fijjy5x77WcBzFeDMP5k000TyXed9dKwAa PkeN+z/LoY5qRNL0KReb+ibZHdWRB/MS4QQXoBxF2FY1kDAu6QPpmVG9/ffLlNaWXt9T If7te5Kl/YK/GFnyeBgCmnyakLwJC0tDje/fq++4xj83eUuqcTume3Vy4nQYa+FaXbLF xWxDm0tApcmFeUnLR4G9QXxETj4zWLtFOsLUZtI/glg/HuYhxHKhnlzJsJN0QEjgvkxW ayDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=X0ZB3LW3l30Fq0eOwrGscIyWdot13e1MeQG3Y4BlhhY=; b=wkZ5wLzdEhPkgZNI9tLKCznXZll3g2ePcfa1lh40WKqR2gstoFVCCr5GJUjVwVRCPF Gph4KXxrOsIKIa+CEUZlu9p7llIyraYyHaBvWaMAB36M5KKW/6MVT9DNCpSWeR6rpQ5J tW2++Sz8ptpPEUIFh8JRls2/Ywnk2LqXu+ZL1UTMOuvX5I4ySeDJ+cb5v1pImWegzMAV I/SoWWJAnHOFy6M9YkDoNtXpyKhR6j+09lZQifcgOBhmh0dfjf3jI0n6DJpEi+nM5LrO TrOZMflC+8W3PC/pJy6ws3n0BME/yJg9I4UPGLjqyKtvy+aJuGyurUHMywd2aa/Ycahy /I4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=q0N6rI6x; 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 d5si2513063pju.62.2019.06.11.06.58.32; Tue, 11 Jun 2019 06:58:49 -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=@lca.pw header.s=google header.b=q0N6rI6x; 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 S2388819AbfFKM7Q (ORCPT + 99 others); Tue, 11 Jun 2019 08:59:16 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33689 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388178AbfFKM7Q (ORCPT ); Tue, 11 Jun 2019 08:59:16 -0400 Received: by mail-qk1-f196.google.com with SMTP id r6so7553967qkc.0 for ; Tue, 11 Jun 2019 05:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X0ZB3LW3l30Fq0eOwrGscIyWdot13e1MeQG3Y4BlhhY=; b=q0N6rI6xhARKRcW6Ya2FCtkBiYjzUAzFSTkEgxxIZAOslEZXdFIboouN8T2LC+fVqj p+OzCD0cG1I1C0Wv02OYas/jyrfCTmwB6F89Ko3PmpNyaRqth1NmE+f387L9J0EhlZ0r GL9pBM0QFB07INgVruPAtqOxK0I2S2tckSjeFJSH2zR/zAyBTFueShoopRrI3T95vAc0 oVmB2vUppb69fgPNR2yaPytyfCRbNGU82poMJwNjWdfRr9yUYZNOlKLgDkUA97uIUCdj 6aOrK7K8cBCyF6xr+ji0TGCLOW3LgorhOzpIIV4UuUOYR0UBr6CK6ZTMkSe4do/gvzcd 6xuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X0ZB3LW3l30Fq0eOwrGscIyWdot13e1MeQG3Y4BlhhY=; b=SbEw/1KwruuJ7xxrUzeSnIByGCuu/+69z2gqXBfS1XdCb6dYSHbeZ5HpT9v6ckSXev ituFSmS+QWmHv8qN65l324uQanhcDmjJoHxJkxVqdxzh1SPaTLUpr9VrndRrCJt++9XN L8O7jUWeDK3rATZs6IYRlXgq3R2L7EKMbFeb5vX7Ljs7aSuyRL6301qLF1UdKJHS9Bnk pLKCp0jD+vQ5/x1743deiWXEElKTbP3S31vK2+vWRSL/bBd6XerdugjCpjpuBPc9rsH1 wdFvJ22S9ALeRto0mCKA65vHUze0XWZp3i9LsnkqydLDzuubCvC+AHiEBERlvM3fsnep bYsw== X-Gm-Message-State: APjAAAWvJxXOOxVUW799NHsfort6L+0PjICJk12JQccyy7FP48Qztot2 /qsgOIFjMm7781aMWh/RWoFLdw== X-Received: by 2002:a37:97c5:: with SMTP id z188mr21521259qkd.5.1560257955516; Tue, 11 Jun 2019 05:59:15 -0700 (PDT) Received: from ovpn-122-116.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id s35sm7784608qts.10.2019.06.11.05.59.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jun 2019 05:59:14 -0700 (PDT) From: Qian Cai To: ard.biesheuvel@linaro.org Cc: mjg59@google.com, linux-efi@vger.kernel.org, bsz@semihalf.com, jarkko.sakkinen@linux.intel.com, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH -next] efi/tpm: fix a compilation warning Date: Tue, 11 Jun 2019 08:59:04 -0400 Message-Id: <20190611125904.1013-1-cai@lca.pw> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The linux-next "tpm: Reserve the TPM final events table" [1] introduced a compilation warning, drivers/firmware/efi/tpm.c: In function 'efi_tpm_eventlog_init': drivers/firmware/efi/tpm.c:80:10: warning: passing argument 1 of 'tpm2_calc_event_log_size' makes pointer from integer without a cast [-Wint-conversion] tbl_size = tpm2_calc_event_log_size(efi.tpm_final_log drivers/firmware/efi/tpm.c:19:43: note: expected 'void *' but argument is of type 'long unsigned int' Fix it by making a necessary cast for the argument 1 of tpm2_calc_event_log_size(). [1] https://lore.kernel.org/linux-efi/20190520205501.177637-3-matthewgarrett@google.com/ Signed-off-by: Qian Cai --- drivers/firmware/efi/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index 74d0cd1647b8..1d3f5ca3eaaf 100644 --- a/drivers/firmware/efi/tpm.c +++ b/drivers/firmware/efi/tpm.c @@ -75,7 +75,7 @@ int __init efi_tpm_eventlog_init(void) goto out; } - tbl_size = tpm2_calc_event_log_size(efi.tpm_final_log + tbl_size = tpm2_calc_event_log_size((void *)efi.tpm_final_log + sizeof(final_tbl->version) + sizeof(final_tbl->nr_events), final_tbl->nr_events, -- 2.20.1 (Apple Git-117)