From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1EF1C46464 for ; Mon, 13 Aug 2018 16:09:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72A0F2186F for ; Mon, 13 Aug 2018 16:09:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72A0F2186F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729596AbeHMSwk (ORCPT ); Mon, 13 Aug 2018 14:52:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:55820 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728293AbeHMSwk (ORCPT ); Mon, 13 Aug 2018 14:52:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BD007AEF1; Mon, 13 Aug 2018 16:09:46 +0000 (UTC) Date: Mon, 13 Aug 2018 18:09:46 +0200 Message-ID: From: Takashi Iwai To: "Dmitry V. Levin" Cc: Jorge Sanjuan , Ruslan Bilovol , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] uapi: fix linux/usb/audio.h userspace compilation error In-Reply-To: <20180813160106.GA22902@altlinux.org> References: <20180813154651.GB22820@altlinux.org> <20180813160106.GA22902@altlinux.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/26 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: # v4.18 > > > Signed-off-by: Dmitry V. Levin > > > > 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