[PATCH 2/2] tpm/tpm_ibmvtpm: Remove unnecessary casts

From: Anton Blanchard
Date: Fri Sep 19 2014 - 17:30:22 EST


There is no need to cast from a void pointer to another pointer.

Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>
---

Index: b/drivers/char/tpm/tpm_ibmvtpm.c
===================================================================
--- a/drivers/char/tpm/tpm_ibmvtpm.c
+++ b/drivers/char/tpm/tpm_ibmvtpm.c
@@ -65,7 +65,7 @@ static struct ibmvtpm_dev *ibmvtpm_get_d
struct tpm_chip *chip = dev_get_drvdata(dev);

BUG_ON(!chip);
- return (struct ibmvtpm_dev *)TPM_VPRIV(chip);
+ return TPM_VPRIV(chip);
}

/**
@@ -83,7 +83,7 @@ static int tpm_ibmvtpm_recv(struct tpm_c
u16 len;
int sig;

- ibmvtpm = (struct ibmvtpm_dev *)TPM_VPRIV(chip);
+ ibmvtpm = TPM_VPRIV(chip);

if (!ibmvtpm->rtce_buf) {
dev_err(ibmvtpm->dev, "ibmvtpm device is not ready\n");
@@ -127,7 +127,7 @@ static int tpm_ibmvtpm_send(struct tpm_c
u64 *word = (u64 *) &crq;
int rc;

- ibmvtpm = (struct ibmvtpm_dev *)TPM_VPRIV(chip);
+ ibmvtpm = TPM_VPRIV(chip);

if (!ibmvtpm->rtce_buf) {
dev_err(ibmvtpm->dev, "ibmvtpm device is not ready\n");
@@ -521,7 +521,7 @@ static void ibmvtpm_crq_process(struct i
**/
static irqreturn_t ibmvtpm_interrupt(int irq, void *vtpm_instance)
{
- struct ibmvtpm_dev *ibmvtpm = (struct ibmvtpm_dev *) vtpm_instance;
+ struct ibmvtpm_dev *ibmvtpm = vtpm_instance;
struct ibmvtpm_crq *crq;

/* while loop is needed for initial setup (get version and
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/