Re: [tpmdd-devel] [PATCH 2/2] tpm/tpm_ibmvtpm: Remove unnecessary casts
From: Jason Gunthorpe
Date: Wed Sep 24 2014 - 12:18:30 EST
On Sat, Sep 20, 2014 at 07:30:14AM +1000, Anton Blanchard wrote:
> There is no need to cast from a void pointer to another pointer.
Looks reasonable to me:
Reviewed-By: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>
>
> Index: b/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
>
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> tpmdd-devel mailing list
> tpmdd-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
--
Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> (780)4406067x832
Chief Technology Officer, Obsidian Research Corp Edmonton, Canada
--
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/