Re: [PATCH v2 6/6] usb: host: tegra: Tegra30 support

From: Sergei Shtylyov
Date: Tue Aug 06 2013 - 15:27:24 EST


On 08/06/2013 11:16 PM, Tuomas Tynkkynen wrote:


+ match = of_match_device(tegra_ehci_of_match, &pdev->dev);
+ if (!match) {
+ dev_err(&pdev->dev, "Error: No device match found\n");
+ return -ENODEV;
+ }
+ soc_config = (struct tegra_ehci_soc_config *)match->data;

Aren't casts from 'const void *' automatic?

WBR, Sergei

Indeed they are, but those explicit casts seem to be used in many places in the kernel.

I suspect people just don't know C well enough. They are also being gradually removed.

WBR, Sergei

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at