remoteproc: ti_k3: fix -Wcast-function-type warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 26 Oct 2020 16:05:23 +0000 (17:05 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 26 Oct 2020 20:44:18 +0000 (15:44 -0500)
commit2316822989a33308e8a428d495e89f767b367c01
treeffb5469b15e8d86363807ebf5f47ec2f7a764883
parent2b0ced1203c2da02ee9fe9f1f8becf834a6bff8b
remoteproc: ti_k3: fix -Wcast-function-type warning

The function cast causes a warning with "make W=1"

drivers/remoteproc/ti_k3_r5_remoteproc.c: In function 'k3_r5_probe':
drivers/remoteproc/ti_k3_r5_remoteproc.c:1368:12: warning: cast between incompatible function types from 'int (*)(struct platform_device *)' to 'void (*)(void *)' [-Wcast-function-type]

Rewrite the code to avoid the cast, and fix the incorrect return
type of the callback.

Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201026160533.3705998-1-arnd@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/ti_k3_r5_remoteproc.c