From: Takashi Iwai <tiwai@suse.de>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Arnd Bergmann <arnd@arndb.de>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Cedric Bregardis <cedric.bregardis@free.fr>,
Jean-Christian Hassler <jhassler@free.fr>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] ALSA: aw2: avoid casting function pointers
Date: Tue, 13 Feb 2024 14:25:03 +0100 [thread overview]
Message-ID: <87cyt0xzrk.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240213101327.460191-1-arnd@kernel.org>
On Tue, 13 Feb 2024 11:13:19 +0100,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> clang-16 started warning about incompatible function pointers here:
>
> sound/pci/aw2/aw2-alsa.c:363:11: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> 363 | (snd_aw2_saa7146_it_cb)
> | ^~~~~~~~~~~~~~~~~~~~~~~
> 364 | snd_pcm_period_elapsed,
> | ~~~~~~~~~~~~~~~~~~~~~~
> sound/pci/aw2/aw2-alsa.c:392:10: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> 392 | (snd_aw2_saa7146_it_cb)
> | ^~~~~~~~~~~~~~~~~~~~~~~
> 393 | snd_pcm_period_elapsed,
> | ~~~~~~~~~~~~~~~~~~~~~~
>
> Add a forward declaration for struct snd_pcm_substrea to allow it to just
> use the correct prototype.
>
> Fixes: 98f2a97f207a ("[ALSA] Emagic Audiowerk 2 ALSA driver.")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied.
Takashi
prev parent reply other threads:[~2024-02-13 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 10:13 Arnd Bergmann
2024-02-13 13:25 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cyt0xzrk.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=cedric.bregardis@free.fr \
--cc=jhassler@free.fr \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®