linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const
@ 2017-08-11 13:19 Bhumika Goyal
  2017-08-13 12:30 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-11 13:19 UTC (permalink / raw)
  To: julia.lawall, dvhart, andy, platform-driver-x86, linux-kernel
  Cc: Bhumika Goyal

Make these const as they are only used during a copy operation.

Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/platform/x86/intel_scu_ipc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index f7cf981..2c85f75 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -72,20 +72,20 @@ struct intel_scu_ipc_pdata_t {
 	u8 irq_mode;
 };
 
-static struct intel_scu_ipc_pdata_t intel_scu_ipc_lincroft_pdata = {
+static const struct intel_scu_ipc_pdata_t intel_scu_ipc_lincroft_pdata = {
 	.i2c_base = 0xff12b000,
 	.i2c_len = 0x10,
 	.irq_mode = 0,
 };
 
 /* Penwell and Cloverview */
-static struct intel_scu_ipc_pdata_t intel_scu_ipc_penwell_pdata = {
+static const struct intel_scu_ipc_pdata_t intel_scu_ipc_penwell_pdata = {
 	.i2c_base = 0xff12b000,
 	.i2c_len = 0x10,
 	.irq_mode = 1,
 };
 
-static struct intel_scu_ipc_pdata_t intel_scu_ipc_tangier_pdata = {
+static const struct intel_scu_ipc_pdata_t intel_scu_ipc_tangier_pdata = {
 	.i2c_base  = 0xff00d000,
 	.i2c_len = 0x10,
 	.irq_mode = 0,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const
  2017-08-11 13:19 [PATCH] platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const Bhumika Goyal
@ 2017-08-13 12:30 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2017-08-13 12:30 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: Julia Lawall, dvhart, Andy Shevchenko, Platform Driver, linux-kernel

On Fri, Aug 11, 2017 at 4:19 PM, Bhumika Goyal <bhumirks@gmail.com> wrote:
> Make these const as they are only used during a copy operation.
>
> Done using Coccinelle.
>

Both patches pushed to testing, thanks!

> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/platform/x86/intel_scu_ipc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
> index f7cf981..2c85f75 100644
> --- a/drivers/platform/x86/intel_scu_ipc.c
> +++ b/drivers/platform/x86/intel_scu_ipc.c
> @@ -72,20 +72,20 @@ struct intel_scu_ipc_pdata_t {
>         u8 irq_mode;
>  };
>
> -static struct intel_scu_ipc_pdata_t intel_scu_ipc_lincroft_pdata = {
> +static const struct intel_scu_ipc_pdata_t intel_scu_ipc_lincroft_pdata = {
>         .i2c_base = 0xff12b000,
>         .i2c_len = 0x10,
>         .irq_mode = 0,
>  };
>
>  /* Penwell and Cloverview */
> -static struct intel_scu_ipc_pdata_t intel_scu_ipc_penwell_pdata = {
> +static const struct intel_scu_ipc_pdata_t intel_scu_ipc_penwell_pdata = {
>         .i2c_base = 0xff12b000,
>         .i2c_len = 0x10,
>         .irq_mode = 1,
>  };
>
> -static struct intel_scu_ipc_pdata_t intel_scu_ipc_tangier_pdata = {
> +static const struct intel_scu_ipc_pdata_t intel_scu_ipc_tangier_pdata = {
>         .i2c_base  = 0xff00d000,
>         .i2c_len = 0x10,
>         .irq_mode = 0,
> --
> 1.9.1
>



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-13 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 13:19 [PATCH] platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const Bhumika Goyal
2017-08-13 12:30 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).