From patchwork Wed Jun 15 13:26:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitoj Kaur Chawla X-Patchwork-Id: 9178525 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 7CE7F60831 for ; Wed, 15 Jun 2016 13:27:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E08B2793B for ; Wed, 15 Jun 2016 13:27:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58C1527F17; Wed, 15 Jun 2016 13:27:04 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no 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 E1A2F27BFF for ; Wed, 15 Jun 2016 13:27:02 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D26E62668C1; Wed, 15 Jun 2016 15:26:55 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2F248265546; Wed, 15 Jun 2016 15:26:47 +0200 (CEST) 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 AC37A26689D; Wed, 15 Jun 2016 15:26:46 +0200 (CEST) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by alsa0.perex.cz (Postfix) with ESMTP id 806E92654D8 for ; Wed, 15 Jun 2016 15:26:39 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id 62so1806357pfd.3 for ; Wed, 15 Jun 2016 06:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=i6FtH26vmwmGSu4UblbVGWVsVcgpOeDXcydmVcng/WM=; b=zHyuGVx2H3rxNJem7A59eCzNZlqULg+tE1+RJ9/L5PZSzNwvI1jouP0/hzPP2+624n NgnJjQH2rbNs/z6AZdUlyNwt7/Gyy/hTWvckIfHdpwBqYn4y6nT/9BCmWNGp06sKi3qX EBSywCxa9n4AfWLMD8wrD9TsCbR/ExC0LxurPHwyGoTdsxT5GA3mT3xQyY0FDx3CDF/q tBK5IcuLOzqalj6/jxUNG5+RmaNyY1vbmN0cP3WHibriCWZZgWMCqRXYRgJPULFH4L6z a9T1VERWBCOfjdyhACr1KqTAqJHKQWwcDfWYV4cXdNrP9Qz6s8QhYIvkmw4Fsip2z7sc NuRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=i6FtH26vmwmGSu4UblbVGWVsVcgpOeDXcydmVcng/WM=; b=iYMA1XynMZRrTVNFtp4wZFQkGOwQBqOpw75htCo+DwKA6twG+49XT+yTmaRqDpqIsx OF/qXzdJyVGqdVglNhMhu9NPY5YqZnfZFGGUfmYB2+9Sap2r9EI+p7VGV/po0z0FDbDR mEwJYYSf8OufEgzWG+Gvt+qzXrONAuMWkLiyt4WPAvNiNNVGNfsur041Puhj4rDKC+Bx sUGl+tKaf/gnB5v7mef8NqG/qx1XbUgb9k++h1s8Ga3NKcuXlI+z7MWw93SPB9ObcHXU tGAL34ExBgxcC/To0HbT1NLo0yM/rVkM/2QOTzExlc/VIpJ7RItKaUScSF/eYzlWNMwL 5+LA== X-Gm-Message-State: ALyK8tJyVSym8BfkjvXuEqw2VA/X7h4n4EyZtWKd+Q3v+BQayfcWaOH5j33u8PYrkUsf5w== X-Received: by 10.98.80.134 with SMTP id g6mr3970808pfj.60.1465997198420; Wed, 15 Jun 2016 06:26:38 -0700 (PDT) Received: from localhost ([182.69.146.61]) by smtp.gmail.com with ESMTPSA id 81sm32161221pfo.74.2016.06.15.06.26.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 15 Jun 2016 06:26:37 -0700 (PDT) Date: Wed, 15 Jun 2016 18:56:34 +0530 From: Amitoj Kaur Chawla To: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Message-ID: <20160615132634.GA20438@amitoj-Inspiron-3542> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: julia.lawall@lip6.fr, michael.leibowitz@intel.com, keescook@chromium.org Subject: [alsa-devel] [PATCH] ALSA: usb-audio: Change structure initialisation to C99 style 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Replace the in order struct initialisation style with explicit field style. The Coccinelle semantic patch used to make this change is as follows: @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; ...}; @@ identifier decl.i1,i2,decl.fld; expression e; position bad.p, bad.fix; @@ struct i1 i2@p = { ..., + .fld = e - e@fix ,...}; Signed-off-by: Amitoj Kaur Chawla --- sound/usb/mixer_maps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c index 1f8fb0d9..9038b2e 100644 --- a/sound/usb/mixer_maps.c +++ b/sound/usb/mixer_maps.c @@ -107,8 +107,10 @@ static struct usbmix_name_map extigy_map[] = { * e.g. no Master and fake PCM volume * Pavel Mihaylov */ -static struct usbmix_dB_map mp3plus_dB_1 = {-4781, 0}; /* just guess */ -static struct usbmix_dB_map mp3plus_dB_2 = {-1781, 618}; /* just guess */ +static struct usbmix_dB_map mp3plus_dB_1 = {.min = -4781, .max = 0}; + /* just guess */ +static struct usbmix_dB_map mp3plus_dB_2 = {.min = -1781, .max = 618}; + /* just guess */ static struct usbmix_name_map mp3plus_map[] = { /* 1: IT pcm */