lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7eeeb5d0-3ef1-35cd-e7e2-cdeeb979b83b@canonical.com>
Date:   Mon, 22 Nov 2021 10:32:22 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To:     "Lad, Prabhakar" <prabhakar.csengg@...il.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Biju Das <biju.das.jz@...renesas.com>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev
Subject: Re: [PATCH] memory: renesas-rpc-if: Silence clang warning

On 22/11/2021 09:46, Lad, Prabhakar wrote:
> Hi Geert,
> 
> Thank you for the review.
> 
> On Mon, Nov 22, 2021 at 7:50 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>
>> Hi Prabhakar,
>>
>> On Sun, Nov 21, 2021 at 7:05 PM Lad Prabhakar
>> <prabhakar.mahadev-lad.rj@...renesas.com> wrote:
>>> 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@...el.com>
>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>>
>> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
>>
>>> --- 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 = (enum rpcif_type)(uintptr_t)of_device_get_match_data(dev);
>>
>> While correct, the cast to "enum rpcif_type" is not stricly needed anymore.
>>
> Agreed.
> 
> @Krzysztof, let me know if you want me to resend the patch with the
> cast to "enum rpcif_type" dropped.

I can fix it when applying, thanks!


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ