Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp864094imu; Fri, 7 Dec 2018 10:04:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/UdCLfdNI20uZzf7VwStkhNXAhooeLDcq393IGo5RPir5cp41o2GIr1kAa/WCFvaiDsoq9h X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr3134874plp.180.1544205862621; Fri, 07 Dec 2018 10:04:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544205862; cv=none; d=google.com; s=arc-20160816; b=IXuCJS7zVSUglMameWfMEW9bAxUJW+iRmXNWE+/0qal8zpONGV2A8hpmYhQ4GPQwcP XQpZROm+cXl9EJdX2jSheWLFRM60n0Q90fJrFnudiJgPDtInU2yFLMhW+ezxQHC4fJhr tvylQSEGzmsz9hE1Chgvjgp/Z63iwf/raN4IamfPQyYKZeRfj/HgYgzpCZcx0NI6fvG0 TV5R7q6d6mTjMie00RmJR8QDhRXdbRbu9rP6Hhq2NvtSgL5sBt0FfKbFf9HXQxPOJnPM vprqlM/rX34Ig23vC/DQBmBKDy12dZ1Mgqzt+KLVyV66+RG++sl3x80RJVqrHfkZ9R1b B1OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ITTPb8403ojo+2ZuTXmSmy5HBrBHa6vaYY/dTQxCJpc=; b=vU6Mr2enLzOR7erM9QyPfseQn5NbLfi4lGs48AkEDjhxls/HJXhu5QUNR7YdRWigkk CP2PmPDdRVTfZh/1211MFJ2o8vZq8xYI/sIjhVqiKO2ueYvYItnDu8de/WJlb75XZLev IMV7nTopib6yjtX2aaf7NFTdL26SH2CmpiPOb4b8f5bXUdUoNa2j75CLzZ/IY0/EkbGL wHsTkv0qLg47axts2Ust8a3TcJFgyV5/KMwHXAvvkVdlUDL403ksyaZqH3isOLPCWHoX 8sK7AwEIgHX9q/kAhkKxXQ1Nyn9M2814WTj2YJuxuuXY4+LV+NH6M+/VEhSpRH9Mxc3e VTyw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 x23si3359536pgj.247.2018.12.07.10.04.00; Fri, 07 Dec 2018 10:04:22 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726233AbeLGSBq (ORCPT + 99 others); Fri, 7 Dec 2018 13:01:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37690 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbeLGSBq (ORCPT ); Fri, 7 Dec 2018 13:01:46 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id 14DA8309E978; Fri, 7 Dec 2018 18:01:46 +0000 (UTC) Received: from redhat.com (ovpn-124-251.rdu2.redhat.com [10.10.124.251]) by smtp.corp.redhat.com (Postfix) with SMTP id 31B355C1A1; Fri, 7 Dec 2018 18:01:45 +0000 (UTC) Date: Fri, 7 Dec 2018 13:01:39 -0500 From: "Michael S. Tsirkin" To: Dongli Zhang Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, jasowang@redhat.com Subject: Re: [PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG() Message-ID: <20181207125951-mutt-send-email-mst@kernel.org> References: <1544168081-13205-1-git-send-email-dongli.zhang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1544168081-13205-1-git-send-email-dongli.zhang@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 07 Dec 2018 18:01:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 07, 2018 at 03:34:41PM +0800, Dongli Zhang wrote: > VIRTIO_PCI_CONFIG() is deprecated. Use VIRTIO_PCI_CONFIG_OFF() instead. > > Signed-off-by: Dongli Zhang > --- > drivers/virtio/virtio_pci_legacy.c | 6 ++++-- > include/uapi/linux/virtio_pci.h | 2 -- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c > index de062fb..eff9ddc 100644 > --- a/drivers/virtio/virtio_pci_legacy.c > +++ b/drivers/virtio/virtio_pci_legacy.c > @@ -52,7 +52,8 @@ static void vp_get(struct virtio_device *vdev, unsigned offset, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > void __iomem *ioaddr = vp_dev->ioaddr + > - VIRTIO_PCI_CONFIG(vp_dev) + offset; > + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + > + offset; > u8 *ptr = buf; > int i; > > @@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, > { > struct virtio_pci_device *vp_dev = to_vp_device(vdev); > void __iomem *ioaddr = vp_dev->ioaddr + > - VIRTIO_PCI_CONFIG(vp_dev) + offset; > + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + > + offset; > const u8 *ptr = buf; > int i; > I agree that VIRTIO_PCI_CONFIG_OFF is a better interface. So above looks fine. > diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h > index 90007a1..2070232 100644 > --- a/include/uapi/linux/virtio_pci.h > +++ b/include/uapi/linux/virtio_pci.h > @@ -78,8 +78,6 @@ > /* The remaining space is defined by each driver as the per-driver > * configuration space */ > #define VIRTIO_PCI_CONFIG_OFF(msix_enabled) ((msix_enabled) ? 24 : 20) > -/* Deprecated: please use VIRTIO_PCI_CONFIG_OFF instead */ > -#define VIRTIO_PCI_CONFIG(dev) VIRTIO_PCI_CONFIG_OFF((dev)->msix_enabled) > > /* Virtio ABI version, this must match exactly */ > #define VIRTIO_PCI_ABI_VERSION 0 This might break some userspace builds, I don't see why we should bother removing it. Any reason? > -- > 2.7.4