lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Sep 2014 10:18:10 -0600
From:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:	Anton Blanchard <anton@...ba.org>
Cc:	Peter Huewe <peterhuewe@....de>, Ashley Lai <ashley@...leylai.com>,
	Marcel Selhorst <tpmdd@...horst.net>,
	tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [tpmdd-devel] [PATCH 2/2] tpm/tpm_ibmvtpm: Remove unnecessary
 casts

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@...idianresearch.com>
 
> Signed-off-by: Anton Blanchard <anton@...ba.org>
> 
> 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@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

-- 
Jason Gunthorpe <jgunthorpe@...idianresearch.com>        (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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ