Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbbKMO2i (ORCPT ); Fri, 13 Nov 2015 09:28:38 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:51346 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753799AbbKMO2g (ORCPT ); Fri, 13 Nov 2015 09:28:36 -0500 X-AuditID: cbfec7f5-f794b6d000001495-8e-5645f391f4ab Subject: Re: [PATCH] nfc: s3fwrn5: constify s3fwrn5_phy_ops structures To: Julia Lawall References: <1447416281-3357-1-git-send-email-Julia.Lawall@lip6.fr> Cc: kernel-janitors@vger.kernel.org, Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , linux-nfc@ml01.01.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org From: Robert Baldyga Message-id: <5645F390.9040407@samsung.com> Date: Fri, 13 Nov 2015 15:28:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-version: 1.0 In-reply-to: <1447416281-3357-1-git-send-email-Julia.Lawall@lip6.fr> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsVy+t/xq7oTP7uGGbzeoWaxePs9FotlD04z Wmy9JW2xbfEUZovLu+awWczZsJnd4s2KO+wWp7tZHTg85p0M9Ni7Jcuje/Y/Fo+5M3+xeXze JBfAGsVlk5Kak1mWWqRvl8CVMfXUY/aCv0IVPy98YG1gPMTfxcjJISFgIrFk+hkWCFtM4sK9 9WxdjFwcQgJLGSW2PrnKCJIQEnjGKLFlthKILSzgJjGzYTobiC0ioC7RumEXVI2zxLvdU8Ga mQUmMElsuT+VCSTBJqAjseX7BKAiDg5eAS2J42/jQMIsAqoS985uZAaxRQUiJCZOaGAFsXkF BCV+TL4HdhCngIvEwmUnWUFamQX0JO5f1AIJMwvIS2xe85Z5AqPALCQdsxCqZiGpWsDIvIpR NLU0uaA4KT3XSK84Mbe4NC9dLzk/dxMjJMS/7mBceszqEKMAB6MSD2/CM5cwIdbEsuLK3EOM EhzMSiK86i9dw4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzztz1PkRIID2xJDU7NbUgtQgmy8TB KdXA2LT4qtkLk9zOhyeWGhu0mb+3PmT4JFlgIUurdNgeWV//g4tTeON531jd0zzEIcC6pO0z F8P2/6LXOvZEN4n+X5Tw/7xm9Pp4odqX3G4RTCbh+uta2Y5fyfsSL+Y5tVc5JEtY7aLfuZL1 iyx72i6zpcsbX9venf3ZVTSE8YzSvcwpsseu9e9UYinOSDTUYi4qTgQASaUyj20CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2604 Lines: 75 On 11/13/2015 01:04 PM, Julia Lawall wrote: > The s3fwrn5_phy_ops structure is never modified, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall Acked-by: Robert Baldyga Thanks! Robert Baldyga > > --- > drivers/nfc/s3fwrn5/core.c | 2 +- > drivers/nfc/s3fwrn5/i2c.c | 2 +- > drivers/nfc/s3fwrn5/s3fwrn5.h | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c > index 0d866ca..9d9c8d5 100644 > --- a/drivers/nfc/s3fwrn5/core.c > +++ b/drivers/nfc/s3fwrn5/core.c > @@ -147,7 +147,7 @@ static struct nci_ops s3fwrn5_nci_ops = { > }; > > int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev, > - struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload) > + const struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload) > { > struct s3fwrn5_info *info; > int ret; > diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c > index c61d8a3..3ed0adf 100644 > --- a/drivers/nfc/s3fwrn5/i2c.c > +++ b/drivers/nfc/s3fwrn5/i2c.c > @@ -125,7 +125,7 @@ static int s3fwrn5_i2c_write(void *phy_id, struct sk_buff *skb) > return 0; > } > > -static struct s3fwrn5_phy_ops i2c_phy_ops = { > +static const struct s3fwrn5_phy_ops i2c_phy_ops = { > .set_wake = s3fwrn5_i2c_set_wake, > .set_mode = s3fwrn5_i2c_set_mode, > .get_mode = s3fwrn5_i2c_get_mode, > diff --git a/drivers/nfc/s3fwrn5/s3fwrn5.h b/drivers/nfc/s3fwrn5/s3fwrn5.h > index 89210d4..7d5e516 100644 > --- a/drivers/nfc/s3fwrn5/s3fwrn5.h > +++ b/drivers/nfc/s3fwrn5/s3fwrn5.h > @@ -44,7 +44,7 @@ struct s3fwrn5_info { > void *phy_id; > struct device *pdev; > > - struct s3fwrn5_phy_ops *phy_ops; > + const struct s3fwrn5_phy_ops *phy_ops; > unsigned int max_payload; > > struct s3fwrn5_fw_info fw_info; > @@ -90,7 +90,7 @@ static inline int s3fwrn5_write(struct s3fwrn5_info *info, struct sk_buff *skb) > } > > int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev, > - struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload); > + const struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload); > void s3fwrn5_remove(struct nci_dev *ndev); > > int s3fwrn5_recv_frame(struct nci_dev *ndev, struct sk_buff *skb, > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/