From patchwork Tue Dec 19 09:14:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Sanjuan X-Patchwork-Id: 10122805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3FA06019C for ; Tue, 19 Dec 2017 09:14:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 974592905C for ; Tue, 19 Dec 2017 09:14:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A7CB290D7; Tue, 19 Dec 2017 09:14:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 010572905C for ; Tue, 19 Dec 2017 09:14:40 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id ABCAC267608; Tue, 19 Dec 2017 10:14:23 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C7892267605; Tue, 19 Dec 2017 10:14:20 +0100 (CET) Received: from imap1.codethink.co.uk (imap1.codethink.co.uk [176.9.8.82]) by alsa0.perex.cz (Postfix) with ESMTP id 18AD72675FB for ; Tue, 19 Dec 2017 10:14:17 +0100 (CET) Received: from [167.98.27.229] (helo=devhw0) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1eRDyb-0008TH-Ec; Tue, 19 Dec 2017 09:14:19 +0000 Received: from jorgesanjuan by devhw0 with local (Exim 4.89) (envelope-from ) id 1eRDyY-0004FU-N1; Tue, 19 Dec 2017 09:14:14 +0000 From: Jorge Sanjuan To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Tue, 19 Dec 2017 09:14:07 +0000 Message-Id: <20171219091411.16267-3-jorge.sanjuan@codethink.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171219091411.16267-1-jorge.sanjuan@codethink.co.uk> References: <20171219091411.16267-1-jorge.sanjuan@codethink.co.uk> Cc: linux-kernel@lists.codethink.co.uk, Jorge Sanjuan , ci005-internal@lists.codethink.co.uk Subject: [alsa-devel] [PATCH v1 2/6] usb: audio: Fix variable length field to be variable. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Make bmaControls be a flex array insted of a fixed size array so it can have a variable length. Signed-off-by: Jorge Sanjuan --- include/linux/usb/audio-v3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio-v3.h index cbbe51e309dd..68f651e8d11a 100644 --- a/include/linux/usb/audio-v3.h +++ b/include/linux/usb/audio-v3.h @@ -176,7 +176,7 @@ struct uac3_feature_unit_descriptor { __u8 bSourceID; /* bmaControls is actually u32, * but u8 is needed for the hybrid parser */ - __u8 bmaControls[0]; /* variable length */ + __u8 bmaControls[]; /* variable length */ /* wFeatureDescrStr omitted */ } __attribute__((packed));