Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1069954imm; Fri, 22 Jun 2018 09:49:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLD64CVmZsbdnrykfA9jSi1M3IbcJYFN33cTN2+JdwfqYdFOhixGKdKprECVUnFkgmhXSOA X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr2481833plp.143.1529686170300; Fri, 22 Jun 2018 09:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529686170; cv=none; d=google.com; s=arc-20160816; b=vOpX+V2aehULIGLd3T+lGS88SZ+hG2JPrcC1ipWzSixg2hNpIqQco5fDDLaupyC4A9 oRGMs6Dq7E1R3QhMhMCa3rVbE89vFJjpSliQmqdVYWjKw649QjD6A9cyD41FFt08PYxe juUly8u+iHRjMe0qNRHZVjVSYwT8APGvQOjFNAi7Q7wFSr6Bwh9C3aYeg7/Skiu1TWS6 IIbCn54UgRzuo5JbfYwoqIwk50ZR/FXEJyA+9ljWM7JkOCW3rU6pSBu7W1/KHrkKnXuk i3Q8PTNDtxVGXF+AD6nvXNaMlkk1kOB4EYQyEznEBkPciFZn51w2xn3bFR2oKv2QBHI9 Kmsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=WHcEmHDt1/+NVriCUGMnaepwJ6QP8m/sDP714q0fOTM=; b=XnE2oRU6Sf8O3nRHgPbKgrGYQS5jmrw9E4oW4qip2azTOv/WwMcygqzxJtlVmZMofH LurWXJWnGN3ZSlCcgWve+KnxhCvPodwmQiiGUn4/fzEduLoSUD3GtQ+DNhPnrZ9iN0ki LrmsGzEe4PjZBbGl3t53+rfuqn5KwMiSNbw9otDLf4VTWCUeHa+x3UkjGQdu5/0pGqBW 8LNHy7XgdyHfL3LcjA6nUrUvbxXyK2G6Rd5cDmhdTZxsgQ245lpu9XhNUbgSnaWLuMnZ o+8JncWpjphL8yk4EjSMeQFZd0xsK7PQ81jw8JIeXXg8FopEgVZqpz1Ao7shESYzQ13P yGOw== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si8068595ple.447.2018.06.22.09.49.15; Fri, 22 Jun 2018 09:49:30 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754291AbeFVQrp (ORCPT + 99 others); Fri, 22 Jun 2018 12:47:45 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51070 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934349AbeFVQqV (ORCPT ); Fri, 22 Jun 2018 12:46:21 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5MGi5u3046832 for ; Fri, 22 Jun 2018 12:46:21 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2js1ne8mba-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Jun 2018 12:46:20 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jun 2018 12:46:20 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 22 Jun 2018 12:46:17 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5MGkGVv40829048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 22 Jun 2018 16:46:16 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1EF511206B; Fri, 22 Jun 2018 12:46:12 -0400 (EDT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9A18112063; Fri, 22 Jun 2018 12:46:12 -0400 (EDT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 22 Jun 2018 12:46:12 -0400 (EDT) From: Stefan Berger To: linux-integrity@vger.kernel.org, jarkko.sakkinen@linux.intel.com, zohar@linux.vnet.ibm.com Cc: jgg@ziepe.ca, linux-kernel@vger.kernel.org, Stefan Berger Subject: [PATCH v3 1/4] tpm: rename tpm_chip_find_get() to tpm_get_ops() Date: Fri, 22 Jun 2018 12:46:10 -0400 X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180622164613.1609313-1-stefanb@linux.vnet.ibm.com> References: <20180622164613.1609313-1-stefanb@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18062216-0072-0000-0000-000003733BD8 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009240; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000265; SDB=6.01050751; UDB=6.00538515; IPR=6.00829721; MB=3.00021808; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-22 16:46:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062216-0073-0000-0000-000048738051 Message-Id: <20180622164613.1609313-2-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-22_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806220186 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename tpm_chip_find_get() to tpm_get_ops(). This now matches the name of its counter part tpm_put_ops() better. Signed-off-by: Stefan Berger --- drivers/char/tpm/tpm-chip.c | 4 ++-- drivers/char/tpm/tpm-interface.c | 14 +++++++------- drivers/char/tpm/tpm.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 0a62c19937b6..4e83695af068 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -81,7 +81,7 @@ void tpm_put_ops(struct tpm_chip *chip) EXPORT_SYMBOL_GPL(tpm_put_ops); /** - * tpm_chip_find_get() - find and reserve a TPM chip + * tpm_get_ops() - find and reserve a TPM chip * @chip: a &struct tpm_chip instance, %NULL for the default chip * * Finds a TPM chip and reserves its class device and operations. The chip must @@ -92,7 +92,7 @@ EXPORT_SYMBOL_GPL(tpm_put_ops); * %NULL if a chip is not found. * %NULL if the chip is not available. */ -struct tpm_chip *tpm_chip_find_get(struct tpm_chip *chip) +struct tpm_chip *tpm_get_ops(struct tpm_chip *chip) { struct tpm_chip *res = NULL; int chip_num = 0; diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index c43a9e28995e..fde731df838b 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -929,7 +929,7 @@ int tpm_is_tpm2(struct tpm_chip *chip) { int rc; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip) return -ENODEV; @@ -953,7 +953,7 @@ int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) { int rc; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip) return -ENODEV; if (chip->flags & TPM_CHIP_FLAG_TPM2) @@ -1012,7 +1012,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash) u32 count = 0; int i; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip) return -ENODEV; @@ -1141,7 +1141,7 @@ int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen) { int rc; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip) return -ENODEV; @@ -1261,7 +1261,7 @@ int tpm_get_random(struct tpm_chip *chip, u8 *out, size_t max) if (!out || !num_bytes || max > TPM_MAX_RNG_DATA) return -EINVAL; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip) return -ENODEV; @@ -1323,7 +1323,7 @@ int tpm_seal_trusted(struct tpm_chip *chip, struct trusted_key_payload *payload, { int rc; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip || !(chip->flags & TPM_CHIP_FLAG_TPM2)) return -ENODEV; @@ -1351,7 +1351,7 @@ int tpm_unseal_trusted(struct tpm_chip *chip, { int rc; - chip = tpm_chip_find_get(chip); + chip = tpm_get_ops(chip); if (!chip || !(chip->flags & TPM_CHIP_FLAG_TPM2)) return -ENODEV; diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 7f2d0f489e9c..9d2ad67778b5 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -535,7 +535,7 @@ static inline void tpm_msleep(unsigned int delay_msec) delay_msec * 1000); }; -struct tpm_chip *tpm_chip_find_get(struct tpm_chip *chip); +struct tpm_chip *tpm_get_ops(struct tpm_chip *chip); __must_check int tpm_try_get_ops(struct tpm_chip *chip); void tpm_put_ops(struct tpm_chip *chip); -- 2.13.6