netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: rvatsavayi@caviumnetworks.com
Cc: netdev@vger.kernel.org, raghu.vatsavayi@caviumnetworks.com,
	derek.chickles@caviumnetworks.com,
	satananda.burla@caviumnetworks.com,
	felix.manlunas@caviumnetworks.com
Subject: Re: [PATCH net-next 2/9] liquidio CN23XX: VF registration
Date: Mon, 28 Nov 2016 00:04:41 -0500 (EST)	[thread overview]
Message-ID: <20161128.000441.620877539663307124.davem@davemloft.net> (raw)
In-Reply-To: <1480308702-6261-3-git-send-email-rvatsavayi@caviumnetworks.com>

From: Raghu Vatsavayi <rvatsavayi@caviumnetworks.com>
Date: Sun, 27 Nov 2016 20:51:35 -0800

> +static int
> +liquidio_vf_probe(struct pci_dev *pdev,
> +		  const struct pci_device_id *ent __attribute__((unused)))
> +{
> +	struct octeon_device *oct_dev = NULL;
 ...
> +	/* set linux specific device pointer */
> +	oct_dev->pci_dev = (void *)pdev;
> +

This is a terrible cast on several levels.  The type is already
correct, oct_dev->pci_dev and pdev are both "struct pci_dev *"

Furthermore, even if oct_dev->pci_dev was "void *", void pointer
casts are _never_ necessary on assignment from any other pointer
type.

  reply	other threads:[~2016-11-28  5:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28  4:51 [PATCH net-next 0/9] liquidio VF operations Raghu Vatsavayi
2016-11-28  4:51 ` [PATCH net-next 1/9] liquidio CN23XX: VF register definitions Raghu Vatsavayi
2016-11-28  4:51 ` [PATCH net-next 2/9] liquidio CN23XX: VF registration Raghu Vatsavayi
2016-11-28  5:04   ` David Miller [this message]
2016-11-28  4:51 ` [PATCH net-next 3/9] liquidio CN23XX: VF config setup Raghu Vatsavayi
2016-11-28 10:21   ` kbuild test robot
2016-11-28 10:31   ` kbuild test robot
2016-11-28  4:51 ` [PATCH net-next 4/9] liquidio CN23XX: VF queue setup Raghu Vatsavayi
2016-11-28  4:51 ` [PATCH net-next 5/9] liquidio CN23XX: VF register access Raghu Vatsavayi
2016-11-28  4:51 ` [PATCH net-next 6/9] liquidio CN23XX: init VF softcommand queues Raghu Vatsavayi
2016-11-28  4:51 ` [PATCH net-next 7/9] liquidio CN23XX: VF mailbox Raghu Vatsavayi
2016-11-28  4:51 ` [PATCH net-next 8/9] liquidio CN23XX: VF interrupt Raghu Vatsavayi
2016-11-28 13:42   ` kbuild test robot
2016-11-28  4:51 ` [PATCH net-next 9/9] liquidio CN23XX: VF init and destroy Raghu Vatsavayi

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=20161128.000441.620877539663307124.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=derek.chickles@caviumnetworks.com \
    --cc=felix.manlunas@caviumnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=raghu.vatsavayi@caviumnetworks.com \
    --cc=rvatsavayi@caviumnetworks.com \
    --cc=satananda.burla@caviumnetworks.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).