Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp36250pxb; Tue, 2 Mar 2021 18:14:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqBuYPucu2KyMKDYyqAd0QFH6IgIz/zcnpelA5yEUVKlS+PEwDQ9EIof3Qh3uiwYLUpsxC X-Received: by 2002:aa7:d2d5:: with SMTP id k21mr17334181edr.216.1614737660756; Tue, 02 Mar 2021 18:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614737660; cv=none; d=google.com; s=arc-20160816; b=Xsa3uoTmLdKqkiLGO0J8Gz/PQ72nAsuic7Etvin8kzXknvhL49WoN0dkrBJfpBY3c0 3CF8guc38oikPneAAjvQxsbfwwNzD81V7oJ4acFFaZNXw/hH2pU3ujH4xqX4t8HqISZC 62i55NxAaDcbtvA+Z8q9rp8cowyT96fsi6zZ0UnhmzWRofojFhGdU29pYuL5DiZtV/Mi +e9881h7t/H0WclJWLKRbtwXlmvu9ZTYAyKs4yWdo2Kgt9rhSsZY1iVMr5+aUh3rSjV4 pZJE9VKsUFqwqQ9zYJlv+Askfz7qZKkt+4fK/7lKDAjNqG4v9cmVI7kG6cnsWfM7RWTH ic6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AnWrYzDCDG++opZDM3UkTwNIpQvr7na90cltFjP+1JY=; b=Z5Ko7F9jNWBcMZcnew5YZ1Bgep9uwykfwX5qhJ4Uga2Ijb7y44YajNO/r1MzWy+hk5 NTfNTBbqUsT9Ap+3exLk/0QSPfuGmtpNubNNi0QRXrcOVVOhwVJ5v+qyBKj3rr3agQBv l6r85WnTmm9C4cnl5Fzu8qrJujainQmVRVBUJ31HJQppSWwTkOaj8qEKnLGq4kLC/YVm zpBoeFqYiB1E30/9TwL5M4gCgNTgd4H0mUiga9iIwjxHMF4T1DUXIE30qgUyuYpIfeVA wqF0OH6YwaG7vkgQjZDCncGBbck47zMQZp9xxvQJx0fejk5OXu03wrYdQnAXqV/XhTUy IFFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E2oUweW1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn4si15718625ejc.353.2021.03.02.18.13.58; Tue, 02 Mar 2021 18:14:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E2oUweW1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234230AbhCAKZU (ORCPT + 99 others); Mon, 1 Mar 2021 05:25:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:60238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbhCAKXL (ORCPT ); Mon, 1 Mar 2021 05:23:11 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C50DE64E13; Mon, 1 Mar 2021 10:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614594150; bh=cXpAgN4LikCvbKoWKcp8iBPz7XpWuUo9aOcmE7Nu8Ps=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E2oUweW1E1knpm3/rH0BBQEGcc5mipD7kWYJOFPI7F5JCyW9+zVLQrrbZLHQu2VB2 B7Pd6M8wqL2IR70lVqSL9Bdpyz+yJO798HbX6G/4QX+DDSFvXzaVlUCzMx0yhz2dy7 4zOFwzwCvruIO5kbi8S5xCDZszIrHyuT3h5rPK1o= Date: Mon, 1 Mar 2021 11:22:27 +0100 From: Greg Kroah-Hartman To: Maciej Kwapulinski Cc: Andy Shevchenko , Arnd Bergmann , Jonathan Corbet , Derek Kiernan , Dragan Cvetic , Linux Kernel Mailing List , Linux Documentation List , Tomasz Jankowski , Savo Novakovic , Jianxun Zhang Subject: Re: [PATCH v1 01/12] gna: add driver module Message-ID: References: <20210216160525.5028-1-maciej.kwapulinski@linux.intel.com> <20210216160525.5028-2-maciej.kwapulinski@linux.intel.com> <85ft1fjhws.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <85ft1fjhws.fsf@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 01, 2021 at 11:18:59AM +0100, Maciej Kwapulinski wrote: > > Andy Shevchenko writes: > > > On Tue, Feb 16, 2021 at 6:11 PM Maciej Kwapulinski > > 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. thanks, greg k-h