linux/drivers/slimbus
Arnd Bergmann c127f98ba9 slimbus: qcom-ctrl: use normal allocation
The previous patch addressed a warning but not the cause:

drivers/slimbus/qcom-ctrl.c: In function 'qcom_slim_probe':
drivers/slimbus/qcom-ctrl.c:584:9: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

There are two things wrong here:

- The naming is very confusing, we now have a member named 'phys'
  that doesn't refer to a phys_addr_t but a dma_addr_t. If we needed
  a dma address, it should be named 'dma' to avoid confusion, and
  to make it less likely that someone passes it into a function that
  expects a physical address.

- The dma address is not used at all at this point. It may have been
  designed to support DMA in the future, but today it doesn't, so
  the only effect right now is to make transfers artificially slower
  by using uncached memory instead of cached memory for a temporary
  buffer.

This removes the unused structure member and instead changes the code
to call devm_kcalloc(), which matches the usage of the 'base' pointer
as an array of temporary buffers.

Fixes: db809859c8 ("slimbus: qcom: fix incompatible pointer warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-02 17:05:17 +01:00
..
core.c slimbus: Add support for 'clock-pause' feature 2017-12-19 11:01:03 +01:00
Kconfig slimbus: qcom: Add Qualcomm Slimbus controller driver 2017-12-19 11:01:03 +01:00
Makefile slimbus: qcom: Add Qualcomm Slimbus controller driver 2017-12-19 11:01:03 +01:00
messaging.c slimbus: Add support for 'clock-pause' feature 2017-12-19 11:01:03 +01:00
qcom-ctrl.c slimbus: qcom-ctrl: use normal allocation 2018-01-02 17:05:17 +01:00
sched.c slimbus: Add support for 'clock-pause' feature 2017-12-19 11:01:03 +01:00
slimbus.h slimbus: core: add common defines required for controllers 2017-12-19 11:01:03 +01:00