Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp412283pxf; Thu, 8 Apr 2021 05:52:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ7iu9jXQ3ILco2VskEV3jeK1RXJo2THG0xBy3U9M38t5b1ZrhrWTWSjOvGSCgcqjP60Ld X-Received: by 2002:a17:906:af91:: with SMTP id mj17mr9831840ejb.228.1617886368750; Thu, 08 Apr 2021 05:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617886368; cv=none; d=google.com; s=arc-20160816; b=qG4Ym2MuIk9hi+RuMkXGjAw1xpLfFtydhTrks///9BNGiLA9cAuW6i4bQSLEubUa1A VXrvPy7lzKLZA3161jyrf4BDq5OXr+Mua/5+V/iirA9Mz6BkRaNeRHHUdwLz3CqJgvAL Oy7Kg1IEJ/PoYTmNwZl7BtLQ1CTV72vHOMAKC2K2Ek1bZscS3xWTqW3VM7XppMYOaJ1E CtuSLTmT9OacoQza/ifN23kBbXrOlQf8UZKuXVZa1MMTeW4Bmg9eX3b86WyYHnQqB78O 9twkgXkaGBV0FH9vBK1sRQzko0DD2HiqZ5qRgarGz0SKkMc+zKYTZiXBzAmZutEz7Vjd NcrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rwVvjSh3NDh1R5wh0l+DuY9dH7d0GQ4DoBDM1LYVRv4=; b=IuKEnRy8Jn0QgTcYRGSOU0y3XKVcH/t2QR8YWbG3psqDOTswv+wooQnpOF5xeqE0mI x5BcznOQfkruhBhQOHamrtoML3NObjn++Mwfjhl/fjcB9D+nubkejZ5+Kg6pT8LgKhvY 7pPJn3hdvJ2eotZ4NnfkTzROslmU9Pmn3QRcJRc/lP+f+Yd1f+X8xaDSTCYs0fVZQl49 zydmR/lTmp4FMM5+lGckVFvh+6yJt5fLIgUV6poouAekQ3yKkUvtXXoKeOThjQPptz+z cG8yfZ9cnwP2qbgScZjD6gVGAaI/iXcxSCl+Vp86pclb+OTOYNfRIqFsJpMTQb+Dx+Uu AXqA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si10094542edq.372.2021.04.08.05.52.25; Thu, 08 Apr 2021 05:52:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231553AbhDHMvl (ORCPT + 99 others); Thu, 8 Apr 2021 08:51:41 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:16843 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231526AbhDHMvk (ORCPT ); Thu, 8 Apr 2021 08:51:40 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FGLgG63ljz9sLf; Thu, 8 Apr 2021 20:49:14 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Thu, 8 Apr 2021 20:51:19 +0800 From: Chen Huang To: Diana Craciun , Alex Williamson , Cornelia Huck CC: , , Chen Huang Subject: [PATCH -next] vfio/fsl-mc: Use module_fsl_mc_driver to simplify the code Date: Thu, 8 Apr 2021 12:58:57 +0000 Message-ID: <20210408125857.1158780-1-chenhuang5@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org module_fsl_mc_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Chen Huang --- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c index 980e59551301..b2fcc77a037f 100644 --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c @@ -701,18 +701,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = { }, }; -static int __init vfio_fsl_mc_driver_init(void) -{ - return fsl_mc_driver_register(&vfio_fsl_mc_driver); -} - -static void __exit vfio_fsl_mc_driver_exit(void) -{ - fsl_mc_driver_unregister(&vfio_fsl_mc_driver); -} - -module_init(vfio_fsl_mc_driver_init); -module_exit(vfio_fsl_mc_driver_exit); +module_fsl_mc_driver(vfio_fsl_mc_driver); MODULE_LICENSE("Dual BSD/GPL"); MODULE_DESCRIPTION("VFIO for FSL-MC devices - User Level meta-driver"); -- 2.17.1