Skip to contentSkip to conversation

platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const

PATCH In review Bhumika Goyal 2 participants 2 messages Aug 11, 2017 – Aug 13, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: intel_scu_ipc: make intel_scu_ipc_pdata_t const

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

Done using Coccinelle.

---
 drivers/platform/x86/intel_scu_ipc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/intel_scu_ipc.c +3 -3
index f7cf981..2c85f75 100644
@@ -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,
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · Bhumika Goyal

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

Done using Coccinelle.

Both patches pushed to testing, thanks!

Quoted 36 lines
---
 drivers/platform/x86/intel_scu_ipc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/intel_scu_ipc.c +3 -4
index f7cf981..2c85f75 100644
@@ -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

Signature · 2 lines
With Best Regards,
Andy Shevchenko