[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5h8t5afdth.wl-tiwai@suse.de>
Date: Mon, 13 Aug 2018 18:09:46 +0200
From: Takashi Iwai <tiwai@...e.de>
To: "Dmitry V. Levin" <ldv@...linux.org>
Cc: Jorge Sanjuan <jorge.sanjuan@...ethink.co.uk>,
Ruslan Bilovol <ruslan.bilovol@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uapi: fix linux/usb/audio.h userspace compilation error
On Mon, 13 Aug 2018 18:01:06 +0200,
Dmitry V. Levin wrote:
>
> On Mon, Aug 13, 2018 at 05:55:25PM +0200, Takashi Iwai wrote:
> > On Mon, 13 Aug 2018 17:46:51 +0200, Dmitry V. Levin wrote:
> > >
> > > Replace NULL with 0 in uac_mixer_unit_bmControls() to fix the following
> > > linux/usb/audio.h userspace compilation error:
> > >
> > > /usr/include/linux/usb/audio.h: In function 'uac_mixer_unit_bmControls':
> > > /usr/include/linux/usb/audio.h:304:10: error: 'NULL' undeclared (first use in this function)
> > > return NULL;
> > >
> > > Fixes: 6cfd839ae78e ("ALSA: usb-audio: UAC3. Add support for mixer unit.")
> > > Cc: <stable@...r.kernel.org> # v4.18
> > > Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
> >
> > Hrm, can we include the standard header for definition of NULL
> > instead? It's way too ugly to use 0 just for that.
>
> It's fine to return 0 as a null pointer.
Fine from syntax POV, but not from semantic.
> If you prefer NULL,
> please include a header that won't break userspace,
> or just move the function out of UAPI.
Maybe better to remove the function from uapi, then.
Takashi
Powered by blists - more mailing lists