Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ethan Luna and committed by
Jarkko Sakkinen
bb7a4e3b 48fe2cdd

+23 -11
+23 -11
drivers/char/tpm/tpm_i2c_atmel.c
··· 31 31 32 32 struct priv_data { 33 33 size_t len; 34 - /* This is the amount we read on the first try. 25 was chosen to fit a 34 + /* 35 + * This is the amount we read on the first try. 25 was chosen to fit a 35 36 * fair number of read responses in the buffer so a 2nd retry can be 36 - * avoided in small message cases. */ 37 + * avoided in small message cases. 38 + */ 37 39 u8 buffer[sizeof(struct tpm_header) + 25]; 38 40 }; 39 41 ··· 60 58 if (status < 0) 61 59 return status; 62 60 63 - /* The upper layer does not support incomplete sends. */ 61 + /* 62 + * The upper layer does not support incomplete sends. 63 + */ 64 64 if (status != len) 65 65 return -E2BIG; 66 66 ··· 80 76 if (priv->len == 0) 81 77 return -EIO; 82 78 83 - /* Get the message size from the message header, if we didn't get the 79 + /* 80 + * Get the message size from the message header, if we didn't get the 84 81 * whole message in read_status then we need to re-read the 85 - * message. */ 82 + * message. 83 + */ 86 84 expected_len = be32_to_cpu(hdr->length); 87 85 if (expected_len > count) 88 86 return -ENOMEM; ··· 117 111 struct i2c_client *client = to_i2c_client(chip->dev.parent); 118 112 int rc; 119 113 120 - /* The TPM fails the I2C read until it is ready, so we do the entire 114 + /* 115 + * The TPM fails the I2C read until it is ready, so we do the entire 121 116 * transfer here and buffer it locally. This way the common code can 122 - * properly handle the timeouts. */ 117 + * properly handle the timeouts. 118 + */ 123 119 priv->len = 0; 124 120 memset(priv->buffer, 0, sizeof(priv->buffer)); 125 121 126 122 127 - /* Once the TPM has completed the command the command remains readable 128 - * until another command is issued. */ 123 + /* 124 + * Once the TPM has completed the command the command remains readable 125 + * until another command is issued. 126 + */ 129 127 rc = i2c_master_recv(client, priv->buffer, sizeof(priv->buffer)); 130 128 dev_dbg(&chip->dev, 131 129 "%s: sts=%d", __func__, rc); ··· 182 172 183 173 dev_set_drvdata(&chip->dev, priv); 184 174 185 - /* There is no known way to probe for this device, and all version 175 + /* 176 + * There is no known way to probe for this device, and all version 186 177 * information seems to be read via TPM commands. Thus we rely on the 187 - * TPM startup process in the common code to detect the device. */ 178 + * TPM startup process in the common code to detect the device. 179 + */ 188 180 189 181 return tpm_chip_register(chip); 190 182 }