Skip to contentSkip to conversation

tpm/tpm_tis: remove unused itpm variable

PATCH Applied Tomas Winkler 2 participants 3 messages Sep 7, 2016 – Sep 8, 2016 2 messages not in the archive TPM device driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tpm/tpm_tis: remove unused itpm variable

Fixes the warning:
drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but not used [-Wunused-but-set-variable]

  bool itpm;
       ^~~~

---
V2: fix typos in the subject

 drivers/char/tpm/tpm_tis_core.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/char/tpm/tpm_tis_core.c +0 -5
index 236015103164..cf6fd13cd1d1 100644
@@ -440,7 +440,6 @@ static int probe_itpm(struct tpm_chip *chip)
 		0x00, 0x00, 0x00, 0xf1
 	};
 	size_t len = sizeof(cmd_getticks);
-	bool itpm;
 	u16 vendor;
 
 	rc = tpm_tis_read16(priv, TPM_DID_VID(0), &vendor);
@@ -451,8 +450,6 @@ static int probe_itpm(struct tpm_chip *chip)
 	if (vendor != TPM_VID_INTEL)
 		return 0;
 
-	itpm = false;
-
 	rc = tpm_tis_send_data(chip, cmd_getticks, len);
 	if (rc == 0)
 		goto out;
@@ -460,8 +457,6 @@ static int probe_itpm(struct tpm_chip *chip)
 	tpm_tis_ready(chip);
 	release_locality(chip, priv->locality, 0);
 
-	itpm = true;
-
 	rc = tpm_tis_send_data(chip, cmd_getticks, len);
 	if (rc == 0) {
 		dev_info(&chip->dev, "Detected an iTPM.\n");
Signature · 8 lines
2.7.4


------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

A message that is not in the archive (sent off-list or not yet received): 1473289262-9395-1-git-send-email-tomas.winkler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 7 lines · Tomas Winkler

Fixes the warning:
drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but not used [-Wunused-but-set-variable]

  bool itpm;
       ^~~~

/Jarkko

------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 10 lines · Jarkko Sakkinen
Quoted 7 lines · Tomas Winkler

Fixes the warning:
drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but not used [-Wunused-but-set-variable]

  bool itpm;
       ^~~~

Applied to master. I will include this to my 4.9 pull.

/Jarkko

------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel