From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbcDIJBF (ORCPT ); Sat, 9 Apr 2016 05:01:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:41724 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbcDIJBC (ORCPT ); Sat, 9 Apr 2016 05:01:02 -0400 Date: Sat, 09 Apr 2016 11:01:00 +0200 Message-ID: From: Takashi Iwai To: "Julia Lawall" Cc: "Jaroslav Kysela" , , , Subject: Re: [PATCH] ALSA: constify ct_timer_ops structures In-Reply-To: <1460190975-16270-1-git-send-email-Julia.Lawall@lip6.fr> References: <1460190975-16270-1-git-send-email-Julia.Lawall@lip6.fr> 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/24.5 (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 Sat, 09 Apr 2016 10:36:15 +0200, Julia Lawall wrote: > > The ct_timer_ops structures are never modified, so declare them as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall Applied, thanks. Takashi > > --- > sound/pci/ctxfi/cttimer.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/pci/ctxfi/cttimer.c b/sound/pci/ctxfi/cttimer.c > index a5d4604..8f94534 100644 > --- a/sound/pci/ctxfi/cttimer.c > +++ b/sound/pci/ctxfi/cttimer.c > @@ -49,7 +49,7 @@ struct ct_timer { > spinlock_t lock; /* global timer lock (for xfitimer) */ > spinlock_t list_lock; /* lock for instance list */ > struct ct_atc *atc; > - struct ct_timer_ops *ops; > + const struct ct_timer_ops *ops; > struct list_head instance_head; > struct list_head running_head; > unsigned int wc; /* current wallclock */ > @@ -128,7 +128,7 @@ static void ct_systimer_prepare(struct ct_timer_instance *ti) > > #define ct_systimer_free ct_systimer_prepare > > -static struct ct_timer_ops ct_systimer_ops = { > +static const struct ct_timer_ops ct_systimer_ops = { > .init = ct_systimer_init, > .free_instance = ct_systimer_free, > .prepare = ct_systimer_prepare, > @@ -322,7 +322,7 @@ static void ct_xfitimer_free_global(struct ct_timer *atimer) > ct_xfitimer_irq_stop(atimer); > } > > -static struct ct_timer_ops ct_xfitimer_ops = { > +static const struct ct_timer_ops ct_xfitimer_ops = { > .prepare = ct_xfitimer_prepare, > .start = ct_xfitimer_start, > .stop = ct_xfitimer_stop, > >