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
| ||
|
Date: Mon, 28 Nov 2016 00:04:41 -0500 (EST) From: David Miller <davem@...emloft.net> To: rvatsavayi@...iumnetworks.com Cc: netdev@...r.kernel.org, raghu.vatsavayi@...iumnetworks.com, derek.chickles@...iumnetworks.com, satananda.burla@...iumnetworks.com, felix.manlunas@...iumnetworks.com Subject: Re: [PATCH net-next 2/9] liquidio CN23XX: VF registration From: Raghu Vatsavayi <rvatsavayi@...iumnetworks.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.
Powered by blists - more mailing lists