From: Raghu Vatsavayi <[email protected]>
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.