kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API
@ 2021-08-27 17:17 Christophe JAILLET
  2021-08-27 17:17 ` [PATCH v1 1/4] " Christophe JAILLET
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Christophe JAILLET @ 2021-08-27 17:17 UTC (permalink / raw)
  To: eli.billauer, arnd, gregkh
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-03 18:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 17:17 [PATCH v1 0/4] char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API Christophe JAILLET
2021-08-27 17:17 ` [PATCH v1 1/4] " Christophe JAILLET
2021-11-03 18:38   ` Christophe JAILLET
2021-08-27 17:17 ` [PATCH v1 2/4] char: xillybus: Remove usage of 'pci_unmap_single()' Christophe JAILLET
2021-08-27 17:17 ` [PATCH v1 3/4] char: xillybus: Remove usage of remaining deprecated pci_ API Christophe JAILLET
2021-08-30  9:48   ` Dan Carpenter
2021-08-30 17:19     ` Christophe JAILLET
2021-08-27 17:17 ` [PATCH v1 4/4] char: xillybus: Simplify 'xillybus_init_endpoint()' Christophe JAILLET
2021-08-28 15:05 ` [PATCH v1 0/4] char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API Eli Billauer
2021-08-28 21:26   ` Arnd Bergmann
2021-08-29  8:23     ` Eli Billauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).