From patchwork Tue Apr 30 22:49:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parav Pandit X-Patchwork-Id: 10924255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E36A81515 for ; Tue, 30 Apr 2019 22:49:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D344D201BD for ; Tue, 30 Apr 2019 22:49:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C577128D4C; Tue, 30 Apr 2019 22:49:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A39C28CE5 for ; Tue, 30 Apr 2019 22:49:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbfD3Wtt (ORCPT ); Tue, 30 Apr 2019 18:49:49 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:45869 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727459AbfD3Wts (ORCPT ); Tue, 30 Apr 2019 18:49:48 -0400 Received: from Internal Mail-Server by MTLPINE2 (envelope-from parav@mellanox.com) with ESMTPS (AES256-SHA encrypted); 1 May 2019 01:49:43 +0300 Received: from sw-mtx-036.mtx.labs.mlnx (sw-mtx-036.mtx.labs.mlnx [10.12.150.149]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3UMncnW009688; Wed, 1 May 2019 01:49:42 +0300 From: Parav Pandit To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kwankhede@nvidia.com, alex.williamson@redhat.com Cc: cjia@nvidia.com, parav@mellanox.com Subject: [PATCHv2 02/10] vfio/mdev: Removed unused kref Date: Tue, 30 Apr 2019 17:49:29 -0500 Message-Id: <20190430224937.57156-3-parav@mellanox.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190430224937.57156-1-parav@mellanox.com> References: <20190430224937.57156-1-parav@mellanox.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove unused kref from the mdev_device structure. Fixes: 7b96953bc640 ("vfio: Mediated device Core driver") Reviewed-by: Cornelia Huck Reviewed By: Kirti Wankhede Reviewed-by: Maxim Levitsky Signed-off-by: Parav Pandit --- drivers/vfio/mdev/mdev_core.c | 1 - drivers/vfio/mdev/mdev_private.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c index 1299d2e72ce2..00ca61392de9 100644 --- a/drivers/vfio/mdev/mdev_core.c +++ b/drivers/vfio/mdev/mdev_core.c @@ -311,7 +311,6 @@ int mdev_device_create(struct kobject *kobj, mutex_unlock(&mdev_list_lock); mdev->parent = parent; - kref_init(&mdev->ref); mdev->dev.parent = dev; mdev->dev.bus = &mdev_bus_type; diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/vfio/mdev/mdev_private.h index 379758c52b1b..ddcf9c72bd8a 100644 --- a/drivers/vfio/mdev/mdev_private.h +++ b/drivers/vfio/mdev/mdev_private.h @@ -30,7 +30,6 @@ struct mdev_device { struct mdev_parent *parent; guid_t uuid; void *driver_data; - struct kref ref; struct list_head next; struct kobject *type_kobj; bool active;