Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2826950pxb; Sat, 25 Sep 2021 19:46:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaF+KewWfD31xWp6HMFGVQrRSJBFmTcbcFQsAUGxalZZhUcA0TynFB76uTSvigIxe5tk+0 X-Received: by 2002:a50:cf01:: with SMTP id c1mr9807621edk.94.1632624394589; Sat, 25 Sep 2021 19:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632624394; cv=none; d=google.com; s=arc-20160816; b=zyNqvhfuVGb9Fn00bUlB+tE92UaOTiVKOWBXo0elh04my+BPBTtjjRPsJiZBWbC9LJ wIRwfrfWg0PGhNG9yvbve2wlPTfWfOzTufEcNZ6KfkGdfG7EYvoqZ6TusgJwPG8uHexH 21mhg3KVQIAYReQCZzEzp4NWsAn4NLSJ6U1IkkzViWg3S6Yf4l5gTLYRGYpF58oL9Pku Z94QqJgvjCm89ZWVWjv6/eglkc/X4ULrLiLK2zdQoKV5sP3uj1o5m5ftFMjWvFFcu5WS rQqyQ035YRO0GzeKPlBf05T9uUPz3omKrafLmr+zpj/s3w7xtqR7sgb1l/hkvKuwCfcV AYBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BFWPDH1+tH8nYur9P9xbjNwTjFVAS7MJE89p9hA26Tk=; b=BPoVcMEp1mQBf+8IcfAb/yAzhjdv/RbEKcVQntvlUH7dQG4xDtkJzfMqfL1+kTuxlZ QRNdderzy1SVYm9ADReY7Uk982scGScBysMqbcnLu3NrKXSqZas8yi16j4cOSzRR+Gx+ 5aOP8F7Yg1MW8Ws8Kd9ZK3i4e21gqmfPEUfeTLUofNscJ27S97EcQadfDSLAs/cGw9YK 9yEW6GRD8G7BgcnBi30AJ1uzVtxHy8gny3L75xG81ZmZ9AqJUi+y30Q8UUELjZsOTj1g 27fquF4ZXjzFW/hv3eSz17SY3owX3gFO6wOYhwEUBTtUrovABUcdzXVQcKvB0Q0d+moI LLTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id le7si13584878ejc.498.2021.09.25.19.45.45; Sat, 25 Sep 2021 19:46:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230360AbhIZCmw (ORCPT + 99 others); Sat, 25 Sep 2021 22:42:52 -0400 Received: from mx24.baidu.com ([111.206.215.185]:50224 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230302AbhIZCmw (ORCPT ); Sat, 25 Sep 2021 22:42:52 -0400 Received: from BC-Mail-Ex12.internal.baidu.com (unknown [172.31.51.52]) by Forcepoint Email with ESMTPS id BE390249169A788A4135; Sun, 26 Sep 2021 10:41:07 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex12.internal.baidu.com (172.31.51.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Sun, 26 Sep 2021 10:41:07 +0800 Received: from localhost (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Sun, 26 Sep 2021 10:41:07 +0800 Date: Sun, 26 Sep 2021 10:41:06 +0800 From: Cai Huoqing To: Christophe JAILLET CC: Bjorn Helgaas , , Subject: Re: [PATCH] PCI: Remove the unused pci wrappers Message-ID: <20210926024106.GA88@LAPTOP-UKSR4ENP.internal.baidu.com> References: <20210925135255.328-1-caihuoqing@baidu.com> <3bf6cee5-a55b-5a6e-26d5-35002b36a2d2@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3bf6cee5-a55b-5a6e-26d5-35002b36a2d2@wanadoo.fr> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25 9月 21 17:14:05, Christophe JAILLET wrote: > Le 25/09/2021 à 15:52, Cai Huoqing a écrit : > > The wrappers in include/linux/pci-dma-compat.h should go away, > > so remove the unused pci wrappers. > > Prefer using dma_xxx() instead of the pci wrappers pci_xxx(). > > > > Signed-off-by: Cai Huoqing > > --- > > include/linux/pci-dma-compat.h | 27 --------------------------- > > 1 file changed, 27 deletions(-) > > > > diff --git a/include/linux/pci-dma-compat.h b/include/linux/pci-dma-compat.h > > index 249d4d7fbf18..33b316f38e1d 100644 > > --- a/include/linux/pci-dma-compat.h > > +++ b/include/linux/pci-dma-compat.h > > @@ -20,13 +20,6 @@ pci_alloc_consistent(struct pci_dev *hwdev, size_t size, > > return dma_alloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC); > > } > > -static inline void * > > -pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, > > - dma_addr_t *dma_handle) > > -{ > > - return dma_alloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC); > > -} > > - > > static inline void > > pci_free_consistent(struct pci_dev *hwdev, size_t size, > > void *vaddr, dma_addr_t dma_handle) > > @@ -89,26 +82,6 @@ pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t dma_handle, > > dma_sync_single_for_device(&hwdev->dev, dma_handle, size, (enum dma_data_direction)direction); > > } > > -static inline void > > -pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg, > > - int nelems, int direction) > > -{ > > - dma_sync_sg_for_cpu(&hwdev->dev, sg, nelems, (enum dma_data_direction)direction); > > -} > > - > > -static inline void > > -pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg, > > - int nelems, int direction) > > -{ > > - dma_sync_sg_for_device(&hwdev->dev, sg, nelems, (enum dma_data_direction)direction); > > -} > > - > > -static inline int > > -pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr) > > -{ > > - return dma_mapping_error(&pdev->dev, dma_addr); > > -} > > - > > #ifdef CONFIG_PCI > > static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) > > { > > > > Hi, > > I'm not sure that this step is needed. > The whole pci-dma-compat.h is close to be obsolete. So axing just a part of > it now is not that really useful. Thanks for your feedback. If someone reuse these wrappers, that will not be checked by checkpatch.pl. And I also will not add check condition to checkpatch.pl, because the wrappers in include/linux/pci-dma-compat.h will go away soon. Removing these API helps driver owner to avoid reusing these obsolete wrappers without reviwing it manually, only works before pci-dma-compat.h is droped. Thanks Cai > > After many patches, there is now just a few users of this deprecated API. > All steps to finalize the job have already been posted [1] and a plan has > been proposed by Arnd Bergmann to have the remaining ones merged in the tree > [2] it maybe cost serval weeks before all subtrees merge to linux-next. > > Some of the message/fusion patches have been re-sent yesterday and today to > the scsi maintainer in order to have them merged. > > BTW, Cai Huoqing, thanks a lot for taking care and proposing the needed > clean-ups in comments and log messages. > Looking at it was the next item of my to-do list, but I'm really pleased to > get some help here to finalize the job once and for all. > > CJ > > [1]: https://lore.kernel.org/kernel-janitors/4cb6f731-7f4d-21d0-c88d-37664ea35002@wanadoo.fr/ > > [2]: https://lore.kernel.org/kernel-janitors/CAK8P3a2CBvw_GP372R+p8f4_pa82sMuQ5iHk4Nb2dJCzm_Fivw@mail.gmail.com/ >