Messages in this thread | | | From | Arnd Bergmann <> | Date | Tue, 27 Oct 2020 13:48:14 +0100 | Subject | Re: [PATCH] firewire: fix function type cast warning |
| |
On Tue, Oct 27, 2020 at 1:13 AM Takashi Sakamoto <o-takashi@sakamocchi.jp> wrote: > On Mon, Oct 26, 2020 at 10:51:27PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > > > gcc -Wextra complains about a suspicious cast: > > > > rivers/firewire/core-cdev.c:985:8: warning: cast between incompatible function types from ‘void (*)(struct fw_iso_context *, dma_addr_t, void *)’ {aka ‘void (*)(struct fw_iso_context *, long long unsigned int, void *)’} to ‘void (*)(struct fw_iso_context *, u32, size_t, void *, void *)’ {aka ‘void (*)(struct fw_iso_context *, unsigned int, long unsigned int, void *, void *)’} [-Wcast-function-type] > > > > The behavior is correct in the end, but this is more clearly > > expressed using a transparent union. > > > > Fixes: 872e330e3880 ("firewire: add isochronous multichannel reception") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > > drivers/firewire/core-cdev.c | 6 +++--- > > drivers/firewire/core-iso.c | 2 +- > > include/linux/firewire.h | 17 ++++++++--------- > > 3 files changed, 12 insertions(+), 13 deletions(-) > > Oscar Carter has posted a patch to fix it. > https://sourceforge.net/p/linux1394/mailman/message/37024966/ > > I don't know exactly but maintainers seems to overlook it...
Right, that seems fairly similar to my version but avoids the GNU extension, so it would be better that version.
Arnd
| |