Re: [PATCH] spi: davinci: Use of_device_get_match_data() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 30, 2021 at 08:53:00AM +0800, tiantao (H) wrote:
> 在 2021/3/29 23:21, Mark Brown 写道:
> > On Mon, Mar 29, 2021 at 04:58:36PM +0800, Tian Tao wrote:

> > > +	spi_data = (struct davinci_spi_of_data *)
> > > +			of_device_get_match_data(&pdev->dev);
> > > +	if (!spi_data)

> > If we need to cast away from void * that's most likely pointing at a
> > bug.

> Even with of_match_device, there is still a type conversion,as follows

> spi_data = (struct davinci_spi_of_data *)match->data;

A type conversion which shouldn't have any need for a cast.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux