From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21D54C433E9 for ; Tue, 16 Mar 2021 16:44:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED0366510E for ; Tue, 16 Mar 2021 16:44:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238905AbhCPQnk (ORCPT ); Tue, 16 Mar 2021 12:43:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52039 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238903AbhCPQnS (ORCPT ); Tue, 16 Mar 2021 12:43:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615912997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9WqAur7tZuvaYnjcsfjPHRmH5mmCaVU652HftFo4qt4=; b=LBZRDABnQXOUqu4OpxHcDjwDP8vhaFkIs5wdnGLeU14rY/nA5k8oZiDIUun7l1ktBbURUg BA8it5G4HWUKC8xBRwQHUM9So9LMEiRc4W90Z9S9dHllxFv/G3W02bMLUqzW3Pwdzw6t8k WACtNAvaRTfb4GCzhXie1qvczMEgazM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-48-wZg0-rLENuyvVCCaOi5yWg-1; Tue, 16 Mar 2021 12:43:13 -0400 X-MC-Unique: wZg0-rLENuyvVCCaOi5yWg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E65A88042BE; Tue, 16 Mar 2021 16:43:11 +0000 (UTC) Received: from gondolin (ovpn-113-185.ams2.redhat.com [10.36.113.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id B713B5C1A1; Tue, 16 Mar 2021 16:43:06 +0000 (UTC) Date: Tue, 16 Mar 2021 17:43:04 +0100 From: Cornelia Huck To: Jason Gunthorpe Cc: Alex Williamson , Diana Craciun , kvm@vger.kernel.org, "Raj, Ashok" , Dan Williams , Daniel Vetter , Christoph Hellwig , Leon Romanovsky , Max Gurtovoy , Tarun Gupta Subject: Re: [PATCH v2 06/14] vfio/fsl-mc: Use vfio_init/register/unregister_group_dev Message-ID: <20210316174304.4ebb1132.cohuck@redhat.com> In-Reply-To: <6-v2-20d933792272+4ff-vfio1_jgg@nvidia.com> References: <0-v2-20d933792272+4ff-vfio1_jgg@nvidia.com> <6-v2-20d933792272+4ff-vfio1_jgg@nvidia.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, 12 Mar 2021 20:55:58 -0400 Jason Gunthorpe wrote: > fsl-mc already allocates a struct vfio_fsl_mc_device with exactly the same > lifetime as vfio_device, switch to the new API and embed vfio_device in > vfio_fsl_mc_device. While here remove the devm usage for the vdev, this > code is clean and doesn't need devm. > > Signed-off-by: Jason Gunthorpe > --- > drivers/vfio/fsl-mc/vfio_fsl_mc.c | 18 ++++++++++-------- > drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 1 + > 2 files changed, 11 insertions(+), 8 deletions(-) Reviewed-by: Cornelia Huck