mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Maciej Kwapulinski <maciej.kwapulinski@linux.intel.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Jonathan Corbet <corbet@lwn.net>,
	Derek Kiernan <derek.kiernan@xilinx.com>,
	Dragan Cvetic <dragan.cvetic@xilinx.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Documentation List <linux-doc@vger.kernel.org>,
	Tomasz Jankowski <tomasz1.jankowski@intel.com>,
	Savo Novakovic <savox.novakovic@intel.com>,
	Jianxun Zhang <jianxun.zhang@linux.intel.com>
Subject: Re: [PATCH v1 01/12] gna: add driver module
Date: Mon, 1 Mar 2021 11:46:06 +0100	[thread overview]
Message-ID: <YDzF7sGvshN2SG5Q@kroah.com> (raw)
In-Reply-To: <85a6rnjgys.fsf@linux.intel.com>

On Mon, Mar 01, 2021 at 11:39:23AM +0100, Maciej Kwapulinski wrote:
> 
> Maciej Kwapulinski <maciej.kwapulinski@linux.intel.com> writes:
> 
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> >
> >> On Mon, Mar 01, 2021 at 11:18:59AM +0100, Maciej Kwapulinski wrote:
> >>> 
> >>> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> >>> 
> >>> > On Tue, Feb 16, 2021 at 6:11 PM Maciej Kwapulinski
> >>> > <maciej.kwapulinski@linux.intel.com> wrote:
> >>> >>
> >>> ....
> >>> >> +static int __init gna_drv_init(void)
> >>> >> +{
> >>> >> +       int ret;
> >>> >> +
> >>> >> +       mutex_init(&gna_drv_priv.lock);
> >>> >> +
> >>> >> +       gna_class = class_create(THIS_MODULE, "gna");
> >>> >> +       if (IS_ERR(gna_class)) {
> >>> >> +               pr_err("class device create failed\n");
> >>> >> +               return PTR_ERR(gna_class);
> >>> >> +       }
> >>> >> +       gna_class->devnode = gna_devnode;
> >>> >> +
> >>> >> +       ret = pci_register_driver(&gna_driver);
> >>> >
> >>> > Is it possible to decouple a PCI glue driver from the class as many
> >>> > other existing examples are doing?
> >>> >
> >>> 
> >>> I see many pci drivers (including staging) that do have it glued though.
> >>> 
> >>> Examples are:
> >>> 1. "static int __init kp2000_pcie_init(void)" (commit on May 20 09:34:11
> >>> 2019)
> >>> 2. "static int __init hl_init(void)" (commit on Mon Feb 18 09:46:43 2019)
> >>> 
> >>> Please give me more details.
> >>
> >> Never use a staging driver for any type of example, _EXECPT_ for a bad
> >> one.  There's a reason the code is in staging and not in the "real" part
> >> of the kernel.
> >
> > ok.
> >
> > another one (1) is not staging..
> 
> I meant "static int __init hl_init(void)" is not staging one....

Still doesn't mean it is a good thing to do.  Again, why isn't this
driver just using the misc driver interface instead?  It's much simpler
to use and should work just fine for this tiny driver, instead of having
to create a custom class just for it.

thanks,

greg k-h

  reply	other threads:[~2021-03-01 10:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 16:05 [PATCH v1 00/12] Driver of Intel(R) Gaussian & Neural Accelerator Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 01/12] gna: add driver module Maciej Kwapulinski
2021-02-16 16:54   ` Andy Shevchenko
2021-02-16 17:37     ` Jianxun Zhang
2021-02-19 13:21     ` Maciej Kwapulinski
2021-02-19 14:36       ` Andy Shevchenko
2021-02-26 18:29     ` Maciej Kwapulinski
2021-02-26 21:22       ` Jianxun Zhang
2021-02-27  6:33       ` Greg Kroah-Hartman
2021-03-01 10:18     ` Maciej Kwapulinski
2021-03-01 10:22       ` Greg Kroah-Hartman
2021-03-01 10:36         ` Maciej Kwapulinski
2021-03-01 10:39           ` Maciej Kwapulinski
2021-03-01 10:46             ` Greg Kroah-Hartman [this message]
2021-03-01 11:45               ` Maciej Kwapulinski
2021-02-16 17:46   ` Greg Kroah-Hartman
2021-02-17  7:30     ` Maciej Kwapulinski
2021-02-26 12:59     ` Maciej Kwapulinski
2021-02-26 13:03       ` Greg Kroah-Hartman
2021-03-09 18:26         ` Maciej Kwapulinski
2021-02-16 17:48   ` Randy Dunlap
2021-02-16 16:05 ` [PATCH v1 02/12] gna: add component of hardware operation Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 03/12] gna: read hardware info in the driver Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 04/12] gna: add memory handling Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 05/12] gna: initialize mmu Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 06/12] gna: add hardware ids Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 07/12] gna: add request component Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 08/12] gna: implement scoring Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 09/12] gna: add a work queue to process scoring requests Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 10/12] gna: add interrupt handler Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 11/12] gna: add ioctl handler Maciej Kwapulinski
2021-02-16 16:05 ` [PATCH v1 12/12] gna: add a char device Maciej Kwapulinski
2021-02-16 17:48   ` Greg Kroah-Hartman
2021-02-16 17:28 ` [PATCH v1 00/12] Driver of Intel(R) Gaussian & Neural Accelerator Greg Kroah-Hartman

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=YDzF7sGvshN2SG5Q@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=derek.kiernan@xilinx.com \
    --cc=dragan.cvetic@xilinx.com \
    --cc=jianxun.zhang@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.kwapulinski@linux.intel.com \
    --cc=savox.novakovic@intel.com \
    --cc=tomasz1.jankowski@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

Powered by JetHome