Thread (3 messages) 3 messages, 3 authors, 2024-02-27

Re: [PATCH] media: mediatek: vcodec: avoid -Wcast-function-type-strict warning

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2024-02-27 12:30:30
Also in: linux-media, linux-mediatek, lkml

On Tue, Feb 27, 2024, at 12:38, Ricardo Ribalda Delgado wrote:
On Sat, Feb 24, 2024 at 1:11 PM Arnd Bergmann [off-list ref] wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>

The ipi handler here tries hard to maintain const-ness of its argument,
but by doing that causes a warning about function type casts:
I worked on the same issue, but in instead of removing the const, I
tried to constify everything:
https://patchwork.linuxtv.org/project/linux-media/patch/20240226-fix-clang-warnings-v2-3-fa1bc931d17e@chromium.org/
I had almost the same patch originally but ended up not sending
it because I could not figure out what to do about

typedef int (*rpmsg_rx_cb_t)(struct rpmsg_device *, void *, int, void *, u32);

which is a generic part of rpmsg that takes a non-const pointer
and gets called by mtk_rpmsg_ipi_handler(), which would now
get a const pointer.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help