summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Luna <trunixcodes@zohomail.com>2026-04-08 11:37:47 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2026-04-21 18:54:28 +0300
commitbb7a4e3b5f96d75756dab6459f073d4b2eedc7a0 (patch)
tree4a5451af0d2fea1c1c557b86b232a96a71b4a629
parent48fe2cddc85c7849463bd01ae8b8c6b575ff508b (diff)
tpm: i2c: atmel: fix block comment formatting
Multiple block comments in tpm_i2c_atmel.c placed the closing '*/' on the same line as the comment text. This violates the kernel's preferred comment style, which requires the closing delimiter to appear on its line. Fix the formatting to improve readability and resolve checkpatch warnings. Signed-off-by: Ethan Luna <trunixcodes@zohomail.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
-rw-r--r--drivers/char/tpm/tpm_i2c_atmel.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c
index 4f229656a8e2..9fd73049821f 100644
--- a/drivers/char/tpm/tpm_i2c_atmel.c
+++ b/drivers/char/tpm/tpm_i2c_atmel.c
@@ -31,9 +31,11 @@
struct priv_data {
size_t len;
- /* This is the amount we read on the first try. 25 was chosen to fit a
+ /*
+ * This is the amount we read on the first try. 25 was chosen to fit a
* fair number of read responses in the buffer so a 2nd retry can be
- * avoided in small message cases. */
+ * avoided in small message cases.
+ */
u8 buffer[sizeof(struct tpm_header) + 25];
};
@@ -58,7 +60,9 @@ static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t bufsiz,
if (status < 0)
return status;
- /* The upper layer does not support incomplete sends. */
+ /*
+ * The upper layer does not support incomplete sends.
+ */
if (status != len)
return -E2BIG;
@@ -76,9 +80,11 @@ static int i2c_atmel_recv(struct tpm_chip *chip, u8 *buf, size_t count)
if (priv->len == 0)
return -EIO;
- /* Get the message size from the message header, if we didn't get the
+ /*
+ * Get the message size from the message header, if we didn't get the
* whole message in read_status then we need to re-read the
- * message. */
+ * message.
+ */
expected_len = be32_to_cpu(hdr->length);
if (expected_len > count)
return -ENOMEM;
@@ -111,15 +117,19 @@ static u8 i2c_atmel_read_status(struct tpm_chip *chip)
struct i2c_client *client = to_i2c_client(chip->dev.parent);
int rc;
- /* The TPM fails the I2C read until it is ready, so we do the entire
+ /*
+ * The TPM fails the I2C read until it is ready, so we do the entire
* transfer here and buffer it locally. This way the common code can
- * properly handle the timeouts. */
+ * properly handle the timeouts.
+ */
priv->len = 0;
memset(priv->buffer, 0, sizeof(priv->buffer));
- /* Once the TPM has completed the command the command remains readable
- * until another command is issued. */
+ /*
+ * Once the TPM has completed the command the command remains readable
+ * until another command is issued.
+ */
rc = i2c_master_recv(client, priv->buffer, sizeof(priv->buffer));
dev_dbg(&chip->dev,
"%s: sts=%d", __func__, rc);
@@ -172,9 +182,11 @@ static int i2c_atmel_probe(struct i2c_client *client)
dev_set_drvdata(&chip->dev, priv);
- /* There is no known way to probe for this device, and all version
+ /*
+ * There is no known way to probe for this device, and all version
* information seems to be read via TPM commands. Thus we rely on the
- * TPM startup process in the common code to detect the device. */
+ * TPM startup process in the common code to detect the device.
+ */
return tpm_chip_register(chip);
}