All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Anton Blanchard <anton@samba.org>
Cc: Peter Huewe <peterhuewe@gmx.de>,
	Ashley Lai <ashley@ashleylai.com>,
	Marcel Selhorst <tpmdd@selhorst.net>,
	tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [tpmdd-devel] [PATCH 2/2] tpm/tpm_ibmvtpm: Remove unnecessary casts
Date: Wed, 24 Sep 2014 10:18:10 -0600	[thread overview]
Message-ID: <20140924161810.GA8898@obsidianresearch.com> (raw)
In-Reply-To: <20140920073014.071007cc@kryten>

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

-- 
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>        (780)4406067x832
Chief Technology Officer, Obsidian Research Corp         Edmonton, Canada

  parent reply	other threads:[~2014-09-24 16:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 21:29 [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad Anton Blanchard
2014-09-19 21:30 ` [PATCH 2/2] tpm/tpm_ibmvtpm: Remove unnecessary casts Anton Blanchard
2014-09-22 17:49   ` Ashley Lai
2014-09-24 16:18   ` Jason Gunthorpe [this message]
2014-09-22 17:43 ` [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad Ashley Lai
2014-09-22 18:03   ` [tpmdd-devel] " Jason Gunthorpe
2014-09-22 17:45 ` Ashley Lai
2014-12-02 19:22 ` Ashley Lai
2014-12-02 19:46   ` Peter Hüwe
2014-12-02 20:09     ` Ashley Lai
2014-12-02 20:39 ` Peter Hüwe
2014-12-02 21:20   ` Anton Blanchard
2014-12-03 23:11     ` Hon Ching (Vicky) Lo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140924161810.GA8898@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=anton@samba.org \
    --cc=ashley@ashleylai.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.