diff options
author | Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> | 2021-11-21 21:01:55 +0300 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-11-22 12:51:44 +0300 |
commit | 2602dc10f9d930bcc537467d13de4cfbfaa2126d (patch) | |
tree | cf7050c3f93818d0f82385d937a0e163081cf626 /drivers/memory | |
parent | b04cc0d912eb80d3c438b11d96ca847c3e77e8ab (diff) | |
download | linux-2602dc10f9d930bcc537467d13de4cfbfaa2126d.tar.xz |
memory: renesas-rpc-if: Silence clang warning
This patch silences the following clang warning:
| drivers/memory/renesas-rpc-if.c:253:14: warning: cast to smaller integer
| type 'enum rpcif_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
| rpc->type = (enum rpcif_type)of_device_get_match_data(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: b04cc0d912eb8 ("memory: renesas-rpc-if: Add support for RZ/G2L")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20211121180155.9062-1-prabhakar.mahadev-lad.rj@bp.renesas.com
[krzysztof: drop enum rpcif_type cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/renesas-rpc-if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 8c51145c0f5c..77c53cd4e1d5 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -250,7 +250,7 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev) return PTR_ERR(rpc->dirmap); rpc->size = resource_size(res); - rpc->type = (enum rpcif_type)of_device_get_match_data(dev); + rpc->type = (uintptr_t)of_device_get_match_data(dev); rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); return PTR_ERR_OR_ZERO(rpc->rstc); |