From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751493AbdHFURV (ORCPT ); Sun, 6 Aug 2017 16:17:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:39008 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751348AbdHFURU (ORCPT ); Sun, 6 Aug 2017 16:17:20 -0400 Date: Sun, 06 Aug 2017 22:17:18 +0200 Message-ID: From: Takashi Iwai To: "Bhumika Goyal" Cc: , , , Subject: Re: [PATCH] ALSA: ice1712: add const to snd_ak4xxx_private structures In-Reply-To: <1501860881-7025-1-git-send-email-bhumirks@gmail.com> References: <1501860881-7025-1-git-send-email-bhumirks@gmail.com> 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/25.2 (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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 04 Aug 2017 17:34:41 +0200, Bhumika Goyal wrote: > > Declare snd_ak4xxx_private structures as const as they are only passed > to the function snd_ice1712_akm4xxx_init. This argument is of type const, > so make the structures const. > Done using Coccinelle: > > @match disable optional_qualifier@ > identifier s; > position p; > @@ > static struct snd_ak4xxx_private s@p={...}; > > @good1@ > identifier match.s; > position p; > @@ > snd_ice1712_akm4xxx_init(...,&s@p,...) > > @bad@ > identifier match.s; > position p!={match.p,good1.p}; > @@ > s@p > > @depends on !bad disable optional_qualifier@ > identifier match.s; > @@ > static > +const > struct snd_ak4xxx_private s={...}; > > Signed-off-by: Bhumika Goyal Applied, thanks. Takashi