linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Marco Pagani <marpagan@redhat.com>
Cc: Xu Yilun <yilun.xu@linux.intel.com>,
	yilun.xu@intel.com, linux-fpga@vger.kernel.org, hao.wu@intel.com,
	mdf@kernel.org
Subject: Re: [GIT PULL] FPGA Manager changes for 6.6-final
Date: Wed, 18 Oct 2023 20:28:32 +0200	[thread overview]
Message-ID: <2023101857-surgical-gab-8469@gregkh> (raw)
In-Reply-To: <727498ba-8ea8-43b9-847b-0280a2bf94e3@redhat.com>

On Wed, Oct 18, 2023 at 05:40:08PM +0200, Marco Pagani wrote:
> On 2023-10-18 13:50, Greg KH wrote:
> > On Wed, Oct 18, 2023 at 11:39:01AM +0200, Marco Pagani wrote:
> >> On 18/10/23 09:50, Greg KH wrote:
> >>> On Wed, Oct 18, 2023 at 10:02:08AM +0800, Xu Yilun wrote:
> >>>> On Tue, Oct 17, 2023 at 07:17:29PM +0200, Greg KH wrote:
> >>>> NULL ptr is referenced.
> >>>>
> >>>> So do fpga-bridge/region-test.
> >>>>
> >>>> Patch #1 adds a common helper to generate a platform driver.
> >>>
> >>> Don't abuse platform devices/drivers like this, this is not a platform
> >>> device or driver.  If you really want to do this, use a real driver and
> >>> device, not a platform one please.
> >>
> >> Other test suites, like DRM suites, already use fake platform devices and
> >> drivers. Moreover, many real FPGA IPs, like reconfiguration controllers and
> >> bridges, are indeed modeled as platform devices. What is the benefit of
> >> using a real driver and device?
> > 
> > Again, please do not abuse platform devices and drivers when they should
> > not be used.  I can't catch all abuses, but when I do see them, I do
> > object to them.
> 
> Could you please elaborate a little more on why using platform drivers
> and devices for test cases is an abuse so I can improve the test suite?

Because they just are not platform devices.

A platform driver is one that has hardware resources like DT or ACPI or
other real resources that talk to hardware and are not on a discoverable
bus, they are NOT fake devices with no actual hardware resources.

If you need a "fake" device, make a fake device, that's what virtual
devices are for there are other solutions as well depending on how you
want to use it.

thanks,

greg k-h

  reply	other threads:[~2023-10-18 18:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 15:00 [GIT PULL] FPGA Manager changes for 6.6-final Xu Yilun
2023-10-17 17:17 ` Greg KH
2023-10-18  2:02   ` Xu Yilun
2023-10-18  7:50     ` Greg KH
2023-10-18  9:39       ` Marco Pagani
2023-10-18 11:50         ` Greg KH
2023-10-18 15:40           ` Marco Pagani
2023-10-18 18:28             ` Greg KH [this message]
2023-10-19  2:11           ` Jinjie Ruan
2023-10-18 15:49       ` Xu Yilun

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=2023101857-surgical-gab-8469@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=marpagan@redhat.com \
    --cc=mdf@kernel.org \
    --cc=yilun.xu@intel.com \
    --cc=yilun.xu@linux.intel.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).