LFX Mentorship application

Vinesh Vilas Raut vineshraut2017 at gmail.com
Fri Aug 6 15:24:51 UTC 2021


On Mon, Aug 2, 2021 at 10:50 PM Lukas Bulwahn <lukas.bulwahn at gmail.com> wrote:
>
> We found 9 cases in the kernel tree:
>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:355:
> WARNING:UNNECESSARY_CASTS: unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/message/fusion/mptlan.c:863: WARNING:UNNECESSARY_CASTS:
> unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/message/fusion/mptlan.c:1009: WARNING:UNNECESSARY_CASTS:
> unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/message/fusion/mptlan.c:1051: WARNING:UNNECESSARY_CASTS:
> unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/net/ethernet/freescale/fs_enet/mac-fcc.c:150:
> WARNING:UNNECESSARY_CASTS: unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/net/ethernet/freescale/fs_enet/mac-fec.c:134:
> WARNING:UNNECESSARY_CASTS: unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c:572:
> WARNING:UNNECESSARY_CASTS: unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> drivers/video/fbdev/goldfishfb.c:241: WARNING:UNNECESSARY_CASTS:
> unnecessary cast may hide bugs, see
> http://c-faq.com/malloc/mallocnocast.html
> include/rdma/ib_verbs.h:2272: WARNING:UNNECESSARY_CASTS: unnecessary
> cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html
>
> Can you please check which of these cases should be refactored (so the
> checkpatch warning points to a valid suggestion to refactor the code)
> or if checkpatch is wrong with its suggestion and why?
>
Here, all 9 cases are valid suggestion by checkpatch.
above 9 cases(file) can be refactor without any functional change.
So, should I create a patches for those files ?

-Vinesh Raut


More information about the Linux-kernel-mentees mailing list