lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <857dmrjdw0.fsf@linux.intel.com>
Date:   Mon, 01 Mar 2021 12:45:51 +0100
From:   Maciej Kwapulinski <maciej.kwapulinski@...ux.intel.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        Jonathan Corbet <corbet@....net>,
        Derek Kiernan <derek.kiernan@...inx.com>,
        Dragan Cvetic <dragan.cvetic@...inx.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Documentation List <linux-doc@...r.kernel.org>,
        Tomasz Jankowski <tomasz1.jankowski@...el.com>,
        Savo Novakovic <savox.novakovic@...el.com>,
        Jianxun Zhang <jianxun.zhang@...ux.intel.com>
Subject: Re: [PATCH v1 01/12] gna: add driver module


Greg Kroah-Hartman <gregkh@...uxfoundation.org> writes:

> On Mon, Mar 01, 2021 at 11:39:23AM +0100, Maciej Kwapulinski wrote:
>> 
>> Maciej Kwapulinski <maciej.kwapulinski@...ux.intel.com> writes:
>> 
>> > Greg Kroah-Hartman <gregkh@...uxfoundation.org> writes:
>> >
>> >> On Mon, Mar 01, 2021 at 11:18:59AM +0100, Maciej Kwapulinski wrote:
>> >>> 
>> >>> Andy Shevchenko <andy.shevchenko@...il.com> writes:
>> >>> 
>> >>> > On Tue, Feb 16, 2021 at 6:11 PM Maciej Kwapulinski
>> >>> > <maciej.kwapulinski@...ux.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.
>

ok

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ