Skip to contentSkip to conversation

remoteproc/mediatek: Use size_t type for len in scp_da_to_va

PATCH Applied Nathan Chancellor 3 participants 3 messages Mar 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc/mediatek: Use size_t type for len in scp_da_to_va

Clang errors:

drivers/remoteproc/mtk_scp.c:364:14: error: incompatible function pointer types initializing 'void *(*)(struct rproc *, u64, size_t)' (aka 'void *(*)(struct rproc *, unsigned long long, unsigned int)') with an expression of type 'void *(struct rproc *, u64, int)' (aka 'void *(struct rproc *, unsigned long long, int)') [-Werror,-Wincompatible-function-pointer-types]

        .da_to_va       = scp_da_to_va,
                          ^~~~~~~~~~~~

1 error generated.

Make the same change as commit 0fcbb369f052 ("remoteproc: Use size_t type for len in da_to_va"), which was not updated for the acceptance of commit 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183").

Fixes 0fcbb369f052 ("remoteproc: Use size_t type for len in da_to_va")
---
 drivers/remoteproc/mtk_scp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/mtk_scp.c +1 -1
index 7ccdf64ff3ea..ea3743e7e794 100644
@@ -320,7 +320,7 @@ static int scp_start(struct rproc *rproc)
 	return ret;
 }
 
-static void *scp_da_to_va(struct rproc *rproc, u64 da, int len)
+static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
 {
 	struct mtk_scp *scp = (struct mtk_scp *)rproc->priv;
 	int offset;
Signature · 1 line
2.26.0.rc1
#1 lore raw
Quoted 12 lines · Nathan Chancellor

Clang errors:

drivers/remoteproc/mtk_scp.c:364:14: error: incompatible function pointer types initializing 'void *(*)(struct rproc *, u64, size_t)' (aka 'void *(*)(struct rproc *, unsigned long long, unsigned int)') with an expression of type 'void *(struct rproc *, u64, int)' (aka 'void *(struct rproc *, unsigned long long, int)') [-Werror,-Wincompatible-function-pointer-types]

        .da_to_va       = scp_da_to_va,
                          ^~~~~~~~~~~~

1 error generated.

Quoted 7 lines

Make the same change as commit 0fcbb369f052 ("remoteproc: Use size_t type for len in da_to_va"), which was not updated for the acceptance of commit 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183").

Fixes 0fcbb369f052 ("remoteproc: Use size_t type for len in da_to_va")

Applied, thank you.

Regards,
Bjorn

Quoted 20 lines
---
 drivers/remoteproc/mtk_scp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/mtk_scp.c +1 -1
index 7ccdf64ff3ea..ea3743e7e794 100644
@@ -320,7 +320,7 @@ static int scp_start(struct rproc *rproc)
 	return ret;
 }
 
-static void *scp_da_to_va(struct rproc *rproc, u64 da, int len)
+static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
 {
 	struct mtk_scp *scp = (struct mtk_scp *)rproc->priv;
 	int offset;
Signature · 1 line
2.26.0.rc1
#2 lore raw
In reply to Nathan Chancellor
This patch was applied to andersson/remoteproc.git (refs/heads/for-next).

Hello:

This patch was applied to andersson/remoteproc.git (refs/heads/for-next).

Quoted 8 lines · On Tue, 10 Mar 2020 14:15:14 -0700 you wrote:

Clang errors:

drivers/remoteproc/mtk_scp.c:364:14: error: incompatible function pointer types initializing 'void *(*)(struct rproc *, u64, size_t)' (aka 'void *(*)(struct rproc *, unsigned long long, unsigned int)') with an expression of type 'void *(struct rproc *, u64, int)' (aka 'void *(struct rproc *, unsigned long long, int)') [-Werror,-Wincompatible-function-pointer-types]

Quoted 5 lines
        .da_to_va       = scp_da_to_va,
                          ^~~~~~~~~~~~

1 error generated.

[...]

Here is a summary with links:
- remoteproc/mediatek: Use size_t type for len in scp_da_to_va

    https://git.kernel.org/andersson/remoteproc/c/18101380c160ec0787e77656106812baa2995f9c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot