linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "tiantao (H)" <tiantao6@huawei.com>
Cc: Tian Tao <tiantao6@hisilicon.com>, linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: davinci: Use of_device_get_match_data() helper
Date: Tue, 30 Mar 2021 11:47:30 +0100	[thread overview]
Message-ID: <20210330104730.GA4976@sirena.org.uk> (raw)
In-Reply-To: <67027863-b52d-ad32-6e17-af5c1d284216@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-03-30 10:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  8:58 [PATCH] spi: davinci: Use of_device_get_match_data() helper Tian Tao
2021-03-29 15:21 ` Mark Brown
2021-03-30  0:53   ` tiantao (H)
2021-03-30 10:47     ` Mark Brown [this message]
2021-03-30 11:56     ` Fabio Estevam
2021-03-30 12:11       ` tiantao (H)
2021-03-30 12:15         ` Fabio Estevam
2021-03-30 12:17           ` tiantao (H)
2021-03-30 12:12       ` Mark Brown

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=20210330104730.GA4976@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=tiantao6@hisilicon.com \
    --cc=tiantao6@huawei.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).