Skip to content

char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API

Christophe JAILLET kernel-janitors linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' APIdrivers/char/xillybus/xillybus_pcie.c+4 -50 replies
2/4char: xillybus: Remove usage of 'pci_unmap_single()'drivers/char/xillybus/xillybus.h drivers/char/xillybus/xillybus_pcie.c+4 -80 replies
3/4char: xillybus: Remove usage of remaining deprecated pci_ APIdrivers/char/xillybus/xillybus.h drivers/char/xillybus/xillybus_core.c drivers/char/xillybus/xillybus_pcie.c+7 -122 replies
4/4char: xillybus: Simplify 'xillybus_init_endpoint()'drivers/char/xillybus/xillybus.h drivers/char/xillybus/xillybus_core.c drivers/char/xillybus/xillybus_of.c +1 more+4 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API

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/[email protected]/
[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(-)
Signature · 1 line
2.30.2