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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 7F177C4320E for ; Fri, 23 Jul 2021 12:29:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6286960720 for ; Fri, 23 Jul 2021 12:29:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234867AbhGWLse (ORCPT ); Fri, 23 Jul 2021 07:48:34 -0400 Received: from verein.lst.de ([213.95.11.211]:38351 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234814AbhGWLse (ORCPT ); Fri, 23 Jul 2021 07:48:34 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6277167373; Fri, 23 Jul 2021 14:29:03 +0200 (CEST) Date: Fri, 23 Jul 2021 14:29:03 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , David Airlie , Tony Krowiak , Alex Williamson , Christian Borntraeger , Cornelia Huck , Jonathan Corbet , Daniel Vetter , Diana Craciun , dri-devel@lists.freedesktop.org, Eric Auger , Eric Farman , Harald Freudenberger , Vasily Gorbik , Heiko Carstens , intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, Jani Nikula , Jason Herne , Joonas Lahtinen , kvm@vger.kernel.org, Kirti Wankhede , linux-doc@vger.kernel.org, linux-s390@vger.kernel.org, Matthew Rosato , Peter Oberparleiter , Halil Pasic , Rodrigo Vivi , Vineeth Vijayan , Zhi Wang , "Raj, Ashok" , Leon Romanovsky , Max Gurtovoy , Yishai Hadas , Zhenyu Wang Subject: Re: [PATCH v2 06/14] vfio/fsl: Move to the device set infrastructure Message-ID: <20210723122903.GA24436@lst.de> References: <0-v2-b6a5582525c9+ff96-vfio_reflck_jgg@nvidia.com> <6-v2-b6a5582525c9+ff96-vfio_reflck_jgg@nvidia.com> <20210723074435.GA2795@lst.de> <20210723122227.GR1117491@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210723122227.GR1117491@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Jul 23, 2021 at 09:22:27AM -0300, Jason Gunthorpe wrote: > > But do we even need the else part? Assingning &mc_dev->dev is > > equivalent to the default per-device set anyway, isn't it? > > Not quite, the default is this: > > if (!device->dev_set) > vfio_assign_device_set(device, device); > > Where 'device' is the vfio_device itself, the above is connecting to > the struct fsl_mc_device. Isn't there a 1:1 relation?