Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp565054pxk; Thu, 17 Sep 2020 10:04:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrkwKF0vcshj1MSmzfzin3uxLd5JqHvW6yXENp4tQsXeouJ/WOfYjZpJ+6ist8bevgN8ho X-Received: by 2002:a50:ce4e:: with SMTP id k14mr9716988edj.177.1600362284411; Thu, 17 Sep 2020 10:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600362284; cv=none; d=google.com; s=arc-20160816; b=EjvwXSPpwXyPFPF2oTZ2G6t54d2oJcsQp1IyWJYuGLJHXsKYOk0gHepp+9srEuCcOQ slH0cvhfcAOsu/4xDWBb2GDWgplPDYrwNWBStaPTJ6Ahv6NXPuQfcojdtjIhKiO/KiEu JjW25clxxUz29Nsp4sOcqEL4id3PLAdPv0kR7SS0zN4vytFrfHYW3+rqnNQBq2LIUuk1 CXmY17v3HuExy39gfFAVmazGHa7wct6w6KZejCuUTAfEuufQ4+ns2KLEwSaC8pZ8L9A6 P3ieVw4sA8uUr7RVQLDKtyOJAX0ABCJThGeLt+cjhSXdpFzWKkWC3saJSWexpUCAIuCq EieA== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=0hdYl9fH7nJZK/R4dAR/PKIYUz1kN2N5BQDfbP3EWU4=; b=rXiCoMmQWUnYEtz4GOuhSUauOetWLgJ3vrNHuKtietmGLHUEXupxulcnKWRg/24GOQ EQLjgw+R0RduuuAR+FlYWrc+Y/nWSkjaJEcahgz7NNsAp2YnaNGf5nyT3Vm5lXqAy80s 7MAkvjBM/1byKOKp5Ics21y9R27dRxAYzU83SKmASgHHc7yySs9w1zxm5Ez2d2dhMRti yW3zHLIVBU1HWpI4UlvoxyyMN1iGDG2Tzm/VVfAunQF7fIE1uY71wlBFkdRIcW1PNiv3 4QFZrOAmEzHkMqDJP/YEnNczLHfR5x0E5B8wJN4DsBQX3zXKqa5THyoqAr6mr2yRPY/V HaaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eNHTEuAQ; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x23si202216edi.291.2020.09.17.10.04.21; Thu, 17 Sep 2020 10:04:44 -0700 (PDT) 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=@kernel.org header.s=default header.b=eNHTEuAQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728822AbgIQRCB (ORCPT + 99 others); Thu, 17 Sep 2020 13:02:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:42940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728788AbgIQRAa (ORCPT ); Thu, 17 Sep 2020 13:00:30 -0400 Received: from localhost (52.sub-72-107-123.myvzw.com [72.107.123.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8DAB7206E6; Thu, 17 Sep 2020 16:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600361504; bh=6+WiNVNUK0WVAF4Ka/mkudbm4081hA29z9BacHCkjUw=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=eNHTEuAQxtV1/GcQH7qv1k8d4vHIxPDIIyneSiNWeItqDAUu8Pg6rANV7qEmA1lTw 6DWTsoNDKg5ftjisEQtZTXh6PjmUQsinh8crAWipysDShqoUOHb/8gLBw0DV9Oueu/ 6LzPG0NX2hiDFP2RVKuPEnKjWTv9wFyUtXzNnBts= Date: Thu, 17 Sep 2020 11:51:43 -0500 From: Bjorn Helgaas To: Liu Shixin Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Duyck Subject: Re: [PATCH -next] PCI/IOV: use module_pci_driver to simplify the code Message-ID: <20200917165143.GA1707439@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917071042.1909191-1-liushixin2@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Alexander] On Thu, Sep 17, 2020 at 03:10:42PM +0800, Liu Shixin wrote: > Use the module_pci_driver() macro to make the code simpler > by eliminating module_init and module_exit calls. > > Signed-off-by: Liu Shixin Applied to pci/misc for v5.10, thanks! > --- > drivers/pci/pci-pf-stub.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/pci/pci-pf-stub.c b/drivers/pci/pci-pf-stub.c > index a0b2bd6c918a..45855a5e9fca 100644 > --- a/drivers/pci/pci-pf-stub.c > +++ b/drivers/pci/pci-pf-stub.c > @@ -37,18 +37,6 @@ static struct pci_driver pf_stub_driver = { > .probe = pci_pf_stub_probe, > .sriov_configure = pci_sriov_configure_simple, > }; > - > -static int __init pci_pf_stub_init(void) > -{ > - return pci_register_driver(&pf_stub_driver); > -} > - > -static void __exit pci_pf_stub_exit(void) > -{ > - pci_unregister_driver(&pf_stub_driver); > -} > - > -module_init(pci_pf_stub_init); > -module_exit(pci_pf_stub_exit); > +module_pci_driver(pf_stub_driver); > > MODULE_LICENSE("GPL"); > -- > 2.25.1 >