Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1507055pxb; Fri, 27 Aug 2021 10:20:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHA3Y2eDfpOA+z6r+sI6wYcWoot5N4fFIA0sVnFjiDa869KdVRv2C/Je53Gej5aq6WO//O X-Received: by 2002:a17:906:2642:: with SMTP id i2mr11464214ejc.323.1630084839041; Fri, 27 Aug 2021 10:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630084839; cv=none; d=google.com; s=arc-20160816; b=JZMfbkN3yH0tBzaTz1rkxFuXHx0UfbqS3yHXyg/wXzhS8gykumgDZJEJZPVTlBJZv/ 2UBKT80aUrJ/uzKsjIcR5mbd0bHR/1qmGXeXQAYRphmHgeIn2qmn7BEze+hNGVhL/VOq aEKeG+fgU8NzhjLo21czZRbX5dNb90BNaKuW6nDHRn3RWHqyqa+NKf7S1f2Wf3pFx+4c 9OaS7wIv8jmFttWFMbWCXJclUo+iMqzp77XMAs/eiHmwug5r2NUz0d8hfriOOfsGWiGy Auob9srkwuYRrVHPyl13WXnbmdNxhkG2kk6NMs59WfzFZpqOE9lRZ4rFLNkDMoFCsIZS +ukg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1Qj8Z3l7Zbg5pJdtwnjMSoqzNm4RaP56WNVwcKVaJVA=; b=REqTmz6b9i0N4CBHBJtkY34uGzwUWfdBYLG00hCYzk3IfQ4bGv5xAeSg07KRApDNXy 5tS6GaYs33RIsYiX50e5rts0rRLdPP7EDtfepPNJy8MBPuGpJ7fnkreBO+6kzbMbLwWc u5udNbpgWCpS4WQXH++TlBR5BpI2FvKb6xmdlUWg683VDhKpF0RG1zN/8BQxN+2flD3Z NzyosCU3aVaAidmY3IwIb4L07n3RrF6SK9VWrWSu3BB/lo7F2+PHiM2oOd7O313L0nI7 JI1W6U1EeY41N0N2NbsLzkCTPB+OolykjqYqK/U1U6EDIv/MwafNkGN28ioHfuXQR0Do FZ6Q== 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 c43si6869539edf.21.2021.08.27.10.20.13; Fri, 27 Aug 2021 10:20:39 -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 S236941AbhH0RST (ORCPT + 99 others); Fri, 27 Aug 2021 13:18:19 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:40664 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230021AbhH0RST (ORCPT ); Fri, 27 Aug 2021 13:18:19 -0400 Received: from pop-os.home ([90.126.253.178]) by mwinf5d74 with ME id mhHU250043riaq203hHUYF; Fri, 27 Aug 2021 19:17:29 +0200 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 27 Aug 2021 19:17:29 +0200 X-ME-IP: 90.126.253.178 From: Christophe JAILLET To: eli.billauer@gmail.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v1 0/4] char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API Date: Fri, 27 Aug 2021 19:17:27 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In [1], Christoph Hellwig has proposed to remove the wrappers in include/linux/pci-dma-compat.h. Some reasons why this API should be removed have been given by Julia Lawall in [2]. However, updating 'drivers/char/xillybus' is a bit tricky because of its use of 'struct xilly_mapping' and 'struct xilly_endpoint'. The first patch is just the easy part of the pci_ --> dma_ conversion. This is mostly done with a coccinelle script. The second updates 'struct xilly_mapping' (and code using it) to explicitly use the dma_ API. The third takes care of 'struct xilly_endpoint' (and code using it). Finally, the 4th patch is a clean-up to remove a now useless parameter from 'xillybus_init_endpoint()' These changes also offert the opportunity to merge some code from 'xillybus_pcie.c' and 'xillybus_of.c' into 'xillybus_core.c'. See 'xilly_dma_sync_single_for_cpu_of()' and 'xilly_dma_sync_single_for_cpu_pci()' for example. This goes beyond the scope of removing the usage of the deprecated 'pci-dma-compat.h' API. The need of 'xilly_pci_direction()' should then be discussed. It could be included afterwards it required. All these patches have been compile tested only. [1]: https://lore.kernel.org/kernel-janitors/20200421081257.GA131897@infradead.org/ [2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/ Christophe JAILLET (4): char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API char: xillybus: Remove usage of 'pci_unmap_single()' char: xillybus: Remove usage of remaining deprecated pci_ API char: xillybus: Simplify 'xillybus_init_endpoint()' drivers/char/xillybus/xillybus.h | 10 ++------ drivers/char/xillybus/xillybus_core.c | 4 +--- drivers/char/xillybus/xillybus_of.c | 2 +- drivers/char/xillybus/xillybus_pcie.c | 33 ++++++++++++--------------- 4 files changed, 18 insertions(+), 31 deletions(-) -- 2.30.2