From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754727AbbKXQaU (ORCPT ); Tue, 24 Nov 2015 11:30:20 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:33219 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753501AbbKXQaQ (ORCPT ); Tue, 24 Nov 2015 11:30:16 -0500 Date: Tue, 24 Nov 2015 16:30:11 +0000 From: Lee Jones To: Julia Lawall Cc: Support Opensource , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: constify da903x_chip_ops structure Message-ID: <20151124163011.GA12874@x1> References: <1447430631-10455-1-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1447430631-10455-1-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Nov 2015, Julia Lawall wrote: > The da903x_chip_ops structure is never modified, so declare it > as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > > --- > drivers/mfd/da903x.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c > index 37e4426..f6a0459 100644 > --- a/drivers/mfd/da903x.c > +++ b/drivers/mfd/da903x.c > @@ -60,7 +60,7 @@ struct da903x_chip_ops { > struct da903x_chip { > struct i2c_client *client; > struct device *dev; > - struct da903x_chip_ops *ops; > + const struct da903x_chip_ops *ops; > > int type; > uint32_t events_mask; > @@ -424,7 +424,7 @@ static irqreturn_t da903x_irq_handler(int irq, void *data) > return IRQ_HANDLED; > } > > -static struct da903x_chip_ops da903x_ops[] = { > +static const struct da903x_chip_ops da903x_ops[] = { > [0] = { > .init_chip = da9030_init_chip, > .unmask_events = da9030_unmask_events, > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog