From: Takashi Iwai <tiwai@suse.de>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Takashi Iwai" <tiwai@suse.de>, "Arnd Bergmann" <arnd@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
"Curtis Malainey" <cujomalainey@chromium.org>,
"Dmitry Antipov" <dmantipov@yandex.ru>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] ALSA: fix function cast warnings
Date: Tue, 13 Feb 2024 14:52:43 +0100 [thread overview]
Message-ID: <87a5o4xyhg.wl-tiwai@suse.de> (raw)
In-Reply-To: <6a52b971-227b-4433-bdf9-b4a69a41d061@app.fastmail.com>
On Tue, 13 Feb 2024 14:30:56 +0100,
Arnd Bergmann wrote:
>
> On Tue, Feb 13, 2024, at 13:56, Takashi Iwai wrote:
> > On Tue, 13 Feb 2024 11:09:56 +0100,
>
> >>
> >> -int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
> >> - const unsigned char *buffer, int count);
> >> +int snd_rawmidi_receive(void *ptr, const void *buffer, int count);
> >
> > If it were only about the type of the buffer argument being a void
> > pointer, it's fine. But the substream argument should be explicitly
> > typed, otherwise it's confusing for other normal call patterns.
> >
> > I guess the suitable fix for now would be to provide wrapper functions
> > that are used for callbacks and bridge to the actual function with
> > pointer cast, something like below. Eventually we can put more const,
> > but it's basically irrelevant with the warning itself.
>
> Right, makes sense. I gave your patch a spin and it addresses the
> warnings I saw in randconfig builds, so please apply that with
> "Reported-by: Arnd Bergmann <arnd@arndb.de>".
OK, will do.
thanks,
Takashi
prev parent reply other threads:[~2024-02-13 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 10:09 [PATCH] ALSA: fix function cast warnings Arnd Bergmann
2024-02-13 12:56 ` Takashi Iwai
2024-02-13 13:30 ` Arnd Bergmann
2024-02-13 13:52 ` 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=87a5o4xyhg.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=cujomalainey@chromium.org \
--cc=dmantipov@yandex.ru \
--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