Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751597AbdHVQjZ (ORCPT ); Tue, 22 Aug 2017 12:39:25 -0400 Received: from mail-dm3nam03on0047.outbound.protection.outlook.com ([104.47.41.47]:58821 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751061AbdHVQjU (ORCPT ); Tue, 22 Aug 2017 12:39:20 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@cavium.com; Subject: Re: [PATCH 1/4] i2c: busses: make i2c_adapter const To: Bhumika Goyal , julia.lawall@lip6.fr, wsa@the-dreams.de, jacmet@sunsite.dk, jglauber@cavium.com, david.daney@cavium.com, hans.verkuil@cisco.com, mchehab@kernel.org, awalls@md.metrocast.net, serjk@netup.ru, aospan@netup.ru, isely@pobox.com, ezequiel@vanguardiasur.com.ar, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org References: <1503138855-585-1-git-send-email-bhumirks@gmail.com> <1503138855-585-2-git-send-email-bhumirks@gmail.com> From: David Daney Message-ID: <9831a3fd-829d-9165-20f9-9cd341e5646b@caviumnetworks.com> Date: Tue, 22 Aug 2017 09:39:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1503138855-585-2-git-send-email-bhumirks@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: SN1PR0701CA0060.namprd07.prod.outlook.com (10.163.126.28) To CY4PR07MB3495.namprd07.prod.outlook.com (10.171.252.152) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31b40033-dc2b-438e-afb7-08d4e97c55ed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR07MB3495; X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB3495;3:6iiUgM+rwWuv/aXNWhyS/pLheqsXTGQAM2QHGvuyMiRaGlUhYX+HVFQzta8BaxYAvDgKzhN7mN60FojgStifWUduEh9irCRE0YWOM7u3qG6nICdTVQ2CijzONNApzp2KHsRVU3wodgQ0LU1qiLlYFw67IHR6LSUBO4ag7/MKbcYjdBVtbzg8ix7yWhamZ4BBDoNsPV/lUSmTV14LN/a2awFcgy/AYOIt9eYKKIPR/HzAEx9zkVOGi8y4t/mZxMKj;25:mJsn0LNulTKDpdIKLh+y+WiEsSUcqTw9ZP9aYNvJ5Es6RDvFaSMbXNRzBw+TuqtcWXAh7FUAOrIgJvw9uaUfmVnVZmbQrLX54XA8iVYl8IDL0SBN6XcTxsg/FYfZHu2Qz6Wv6UW2SIPW1IWEfUyeIOb+FBanin0NxK7nWRVStAljKAfTR0uRNvsBzcg24VPjKyhxKXlnAgkBN/7w0gQkV0HnlSf8+qrE00VANWlIEASkjHTmXzWTRApfxuEfD0gBSRpeIorGBa5dEx0JJTDYpf7gnx6SJpiVJqk3LMVi33Y0n7PbsqixzhtY5A3UX/YK2CfFDHi+39p5q1syeRalmQ==;31:kU2zapjR2okbLKQdQSUsd5B0c1FVgR2edi4pkIjWqBPbL/v3jyGmDY5b5hKmHa6OTBygI+HPrDwzzxgU2dkEJaTrRpwcAWhDPqVUFCo28S02q7tezBk8i6Uv15Kpcipz7jGUr6+i2NT5QLvXFUxRnvG/iQaooI2WYuNfLy2y9rrQfJ5SmKJgwmxxl5zFeaGH+V4oedUj6H0qChNoFRT9+/vqhf9zTyUwMy0lavpsLiI= X-MS-TrafficTypeDiagnostic: CY4PR07MB3495: X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB3495;20:9V2j6prGLDqaPA0680aPOb2It+u7p+GdGXUV93o/wASMjkj7OeYJuP1p3eVcL0MyoMwiMXawOtiMv5zpdi5pJsJK2nfaUCi5mzFqJWPRfhKZTEKjh754dKdchkM/RBBxY1LoraqauOaT6v05sJcBX5O60UTmsXu6GRJocWUP9VifzKY9div5wIyBZLtX2TltM0DBdkRFALN3m60Svi4EKDRz3AR+kZpHG+Jc9F2tQcm6zHCbRwR16uDNvok37Nw7eIJRnl0n/Jvl7Mof7w8M3BeVvmi4agsZ6KoX8Nu8AD0Ncg3IKkABo5PQK8p3wpdtfzc4rAbskTtLmZpmW8cb7jRyf7GdW3ueykBfy0dwEsRVKTlSC6CBY2i+rtmEk3fgaBtjfNbysSu2SbQfRUNiKSk2IHny09DtNuhPcZcH8hUtRCcAU+1R6PEgfg7D/l1dpEtMbW08lM++A3Te7aTOln9n2IiTKWT5Z2qZ9SdM1VBEVzfq2qDOzfqa60CSLyIT2wRlANHrl4OC+ZhFBZBl8ph6zn3/mxjPEVHGTO6C9+Phygc+cGUDFDs8YLTndm7aKeUwteckXIeRtu7Fsq6oZKPuP+oqCVKEm/zQEYJU5kM=;4:5QPbFYd6eme879/xJtZrj5eZx73SMfIbWoyyjBOor6S8UEqcaF3PwPfNlp10lyjmZH/jj3ljl/QBSKbMFEAThywcFZ0FSY2bKXrbl+gQ7FhX7a4P0dvaFuLzLiv6dcWpLBNCAUeeVtzlrlXlLcYMpvdzvJWh355C8u1XxJlkewac5ZDYud2C84ZGu7vONEcGVnPg5yWsD3bhGESzZEix4529+XEjoYfkgi90GKmOpaJCmScWELW/U+FhlVWFkvTV X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(3002001)(6041248)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR07MB3495;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR07MB3495; X-Forefront-PRVS: 04073E895A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(199003)(377454003)(189002)(24454002)(50986999)(53416004)(229853002)(4001350100001)(6486002)(6116002)(97736004)(3846002)(105586002)(230700001)(36756003)(42186005)(2906002)(53546010)(54356999)(305945005)(7736002)(76176999)(23676002)(189998001)(8676002)(6506006)(7416002)(65956001)(110136004)(81166006)(66066001)(81156014)(68736007)(31686004)(101416001)(65806001)(6246003)(53936002)(72206003)(2950100002)(106356001)(50466002)(47776003)(42882006)(33646002)(6666003)(478600001)(7350300001)(6512007)(69596002)(65826007)(25786009)(8656003)(83506001)(64126003)(31696002)(5660300001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB3495;H:ddl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjA3TUIzNDk1OzIzOnpGN1lvckY5RjNNbS9mek1NV3dqc2FPTGRx?= =?utf-8?B?MDFDMEZRMmtONkppY1dvcmJvR0hqb21qKzVOVE1xWXJNWlUrTnhMRGNoRUhC?= =?utf-8?B?cGJ3U3BQOE9NTmNiUnlyRVFEU0hZNllFTXZKM2FjKzNUdDJRZTZoK2RyVHpS?= =?utf-8?B?cUJ5by95ck14YXpPM0N0ekY3TVQxV0tndzFZY3JHd1luT3pDcFVNalArbG11?= =?utf-8?B?K0V3SG42WlpiM3R3NEVNeTMyWEY2ZHJhTnZWby8xUG8raVdhNXBVcDlPZGFV?= =?utf-8?B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Hw5ri1silPeRTT0kPrULCwWqsofWvREPWI/oUyZVpF93fU6HXtqJncPf5FQ4ySKjws2S/lgLrTp3kp2M5nNSwvlXozJuToME+m307TQMNiDsBH7CgHplQ/0eq1lsP8yoXBJRVs/9lAhouSKhirE0w2EeSgVptu6rdmbzGr3hfsAbYVojx9YQHZy+ksiXs7nBDJbj/HW0EYHnxzRjo4ZbkEeY0FOiNgDQsQvVzK+E3pciCnFiCPlrkLsxGb9xA2I3vQUbsdrtxoGY61fVlH1PZctxrZA==;5:WvkYl4/lAOZD4GpdDCWPOEv48S8dkh95kHBLPQvMIZdy2ZeGvHsGz5UaO24xxkbFiKZ1+mRaIINDXW+ql02mJh/zuINIfojkLor1RIhOWwLIPPV6X7U2g/ejsx7opo4HxcUrnzvOk5EOEKj74JMNTA==;24:KQBVUGEGgdSqy5+y6AHQRRyv+E95IFffUPiycZN8CLuT/PgYREzF3Mv+xm4ipi4l2tMartXNCkCdtKg7x1uxFaFY4hfoktoIT8NLqQSMEQg=;7:qfxRNk0fD64zT7nAxGOaNoUiKAOBLeG8AhCcw/A9a2oVRSoIgyuoahzbp4x2/rgA0Wucr2Kweg6DD6PNf6MkaWLsJ/zpq2eQKFSXfG/9mqU/eGEVztqGUMeEfjPexpAj2nCIcYZNP3IBNbYP8tSpyoP/40l7SjxLAhwntY//waQHjwsQlGnOgAILXtLrpXEvKypEj/bc1wYy8uySd8f2L6wWSdt/YyqA1an2xTpyzWM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2017 16:39:17.6845 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3495 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3286 Lines: 88 On 08/19/2017 03:34 AM, Bhumika Goyal wrote: > Make these const as they are only used in a copy operation. > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal i2c-octeon-platdrv.c and i2c-thunderx-pcidrv.c changes: Acked-by: David Daney Thanks. > --- > drivers/i2c/busses/i2c-kempld.c | 2 +- > drivers/i2c/busses/i2c-ocores.c | 2 +- > drivers/i2c/busses/i2c-octeon-platdrv.c | 2 +- > drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- > drivers/i2c/busses/i2c-xiic.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-kempld.c b/drivers/i2c/busses/i2c-kempld.c > index 25993d2..e879190 100644 > --- a/drivers/i2c/busses/i2c-kempld.c > +++ b/drivers/i2c/busses/i2c-kempld.c > @@ -289,7 +289,7 @@ static u32 kempld_i2c_func(struct i2c_adapter *adap) > .functionality = kempld_i2c_func, > }; > > -static struct i2c_adapter kempld_i2c_adapter = { > +static const struct i2c_adapter kempld_i2c_adapter = { > .owner = THIS_MODULE, > .name = "i2c-kempld", > .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, > diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c > index 34f1889..8c42ca7 100644 > --- a/drivers/i2c/busses/i2c-ocores.c > +++ b/drivers/i2c/busses/i2c-ocores.c > @@ -276,7 +276,7 @@ static u32 ocores_func(struct i2c_adapter *adap) > .functionality = ocores_func, > }; > > -static struct i2c_adapter ocores_adapter = { > +static const struct i2c_adapter ocores_adapter = { > .owner = THIS_MODULE, > .name = "i2c-ocores", > .class = I2C_CLASS_DEPRECATED, > diff --git a/drivers/i2c/busses/i2c-octeon-platdrv.c b/drivers/i2c/busses/i2c-octeon-platdrv.c > index 917524c..64bda83 100644 > --- a/drivers/i2c/busses/i2c-octeon-platdrv.c > +++ b/drivers/i2c/busses/i2c-octeon-platdrv.c > @@ -126,7 +126,7 @@ static u32 octeon_i2c_functionality(struct i2c_adapter *adap) > .functionality = octeon_i2c_functionality, > }; > > -static struct i2c_adapter octeon_i2c_ops = { > +static const struct i2c_adapter octeon_i2c_ops = { > .owner = THIS_MODULE, > .name = "OCTEON adapter", > .algo = &octeon_i2c_algo, > diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c > index ea35a895..df0976f 100644 > --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c > +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c > @@ -75,7 +75,7 @@ static u32 thunderx_i2c_functionality(struct i2c_adapter *adap) > .functionality = thunderx_i2c_functionality, > }; > > -static struct i2c_adapter thunderx_i2c_ops = { > +static const struct i2c_adapter thunderx_i2c_ops = { > .owner = THIS_MODULE, > .name = "ThunderX adapter", > .algo = &thunderx_i2c_algo, > diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c > index 34b27bf..ae6ed25 100644 > --- a/drivers/i2c/busses/i2c-xiic.c > +++ b/drivers/i2c/busses/i2c-xiic.c > @@ -721,7 +721,7 @@ static u32 xiic_func(struct i2c_adapter *adap) > .functionality = xiic_func, > }; > > -static struct i2c_adapter xiic_adapter = { > +static const struct i2c_adapter xiic_adapter = { > .owner = THIS_MODULE, > .name = DRIVER_NAME, > .class = I2C_CLASS_DEPRECATED, >