From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v2] ALSA: usb-audio: Change structure initialisation to C99 style Date: Fri, 17 Jun 2016 17:00:03 +0200 Message-ID: References: <20160617144215.GA17151@amitoj-Inspiron-3542> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id D1057265E07 for ; Fri, 17 Jun 2016 17:00:03 +0200 (CEST) In-Reply-To: <20160617144215.GA17151@amitoj-Inspiron-3542> 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 To: Amitoj Kaur Chawla Cc: alsa-devel@alsa-project.org, keescook@chromium.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr, michael.leibowitz@intel.com List-Id: alsa-devel@alsa-project.org On Fri, 17 Jun 2016 16:42:15 +0200, Amitoj Kaur Chawla wrote: > > To allow for structure randomisation, 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 > --- > Changes in v2: > -Modified commit message Applied, thanks. Takashi