Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6597835ybl; Wed, 15 Jan 2020 07:13:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyAwaicj966YmRQ54V3T0M6ZlclZyAf1SQ1HfuroWNuswIaob6n48Z3TROHgU1ovWt/dzgc X-Received: by 2002:aca:72cd:: with SMTP id p196mr159063oic.99.1579101225001; Wed, 15 Jan 2020 07:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579101224; cv=none; d=google.com; s=arc-20160816; b=l2d4eE/dO5A+1UEXoq+3kYpEWenWU9uABFbp804k01sgT9QkFjJ5n6SELy2sfXQTfD SeD7/gbnHP6K6xtNwI/yurcGHf0weqilHw/9jjmBKYc72qoL4k/eiWEl7Zsmh2CCuIfu ppUF4nFwS6L1uHrNI13mBPId4/+L5YM+UocgnqpFSk2/tDpTW4T1CQnV9yk+q6NQy49A hK4NxrX5Yhjjl9CcT2+eIV7n+wARvh45FIJQw8BXJgSUDp03DgVLZdvs7OdOkBftdJ4s Z1eao0f7js3Z+7v1IhDloh4OMUz3zVKYihbrVa+x8kCdYRAzuC4t9EEC5kMICrXhUKp2 o+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=QY8+0O7c2VwRb5cv2HAAJnI3AuJd5YIMsYZK7EcA7eM=; b=F1xBowwtzDHCfoOwV0YFhMdsxNsPxE7+jbssS4z06GH/v57jYdcESt42I+h+g3N858 sI6zs9v0OFb1NrPOOqCpxrWfaNxZJOekE43jR377QKTC02KAqP30J6ssxjoCFdj9W7IL jM3cuBGPp08WTvNgUUa1AwLga0pWbIHKCBtfF5VcWvElG/wsKInCNp/8xl+OtwdVaDwT a/DeQJ2Vi8jfG7SD+Skwn+5My7sIvpcJD4S0xlniLwO0rhuM7z+Y+jusc35VJ405QIgk qWQpwF9/JjZaifhZ0G+Ko+l6mjUu6EVX8ppjHCnCyyENQyhMyBgXOh7LwIeuqDFT5uCg 0euA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gQ7Ovka4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si11068914otp.111.2020.01.15.07.13.31; Wed, 15 Jan 2020 07:13:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gQ7Ovka4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729137AbgAOPMe (ORCPT + 99 others); Wed, 15 Jan 2020 10:12:34 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:58935 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728901AbgAOPMd (ORCPT ); Wed, 15 Jan 2020 10:12:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579101152; 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=QY8+0O7c2VwRb5cv2HAAJnI3AuJd5YIMsYZK7EcA7eM=; b=gQ7Ovka41D1ndqnlJNXMWFZW0O5gqgk6JVeuoPHa9CpXPHtZokbn4w9LOSm0zjODhpELR8 VyhAn6CyuDsUV/LYJEpD62fm6uIkLjSKqYYkwNgIFV4SAq6B8xY9b/237h8o6BiaxW0hiY VZK6xtcOBQi3Hw2vbjlkP2agITzYIis= 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-380-fEpNw1loObWxgDUPpaV5nQ-1; Wed, 15 Jan 2020 10:12:29 -0500 X-MC-Unique: fEpNw1loObWxgDUPpaV5nQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 041D410052E2; Wed, 15 Jan 2020 15:12:28 +0000 (UTC) Received: from w520.home (ovpn-116-28.phx2.redhat.com [10.3.116.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB0EA84322; Wed, 15 Jan 2020 15:12:24 +0000 (UTC) Date: Wed, 15 Jan 2020 08:12:24 -0700 From: Alex Williamson To: Cornelia Huck Cc: Liu Yi L , kwankhede@nvidia.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kevin.tian@intel.com, joro@8bytes.org, peterx@redhat.com, baolu.lu@linux.intel.com Subject: Re: [PATCH v4 05/12] vfio_pci: duplicate vfio_pci.c Message-ID: <20200115081224.215a994c@w520.home> In-Reply-To: <20200115120300.24874a37.cohuck@redhat.com> References: <1578398509-26453-1-git-send-email-yi.l.liu@intel.com> <1578398509-26453-6-git-send-email-yi.l.liu@intel.com> <20200115120300.24874a37.cohuck@redhat.com> 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.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Jan 2020 12:03:00 +0100 Cornelia Huck wrote: > On Tue, 7 Jan 2020 20:01:42 +0800 > Liu Yi L wrote: > > > This patch has no code change, just a file copy. In following patches, > > vfio_pci_common.c will be modified to only include the common functions > > and related static functions in original vfio_pci.c. Meanwhile, vfio_pci.c > > will be modified to only include vfio-pci module specific codes. > > > > Cc: Kevin Tian > > Cc: Lu Baolu > > Signed-off-by: Liu Yi L > > --- > > drivers/vfio/pci/vfio_pci_common.c | 1708 ++++++++++++++++++++++++++++++++++++ > > 1 file changed, 1708 insertions(+) > > create mode 100644 drivers/vfio/pci/vfio_pci_common.c > > This whole procedure of "let's copy the file and rip out unneeded stuff > later" looks very ugly to me, especially if I'd come across it in the > future, e.g. during a bisect. This patch only adds a file that is not > compiled, and later changes will be "rip out unwanted stuff from > vfio_pci_common.c" instead of the more positive "move common stuff to > vfio_pci_common.c". I think refactoring/moving interfaces/code that it > makes sense to share makes this more reviewable, both now and in the > future. I think this comes largely at my request from previous reviews. It's very easy to apply this patch and diff the files to see that nothing has changed, then review the subsequent patch to see that code is only added or removed to check that there are no actual code changes. If we just selectively move code then I think it's left to our inspection to verify nothing has changed. Maybe this is a dummy step in a bisect, but I don't see that you lose any granularity. Thanks, Alex