Skip to contentSkip to conversation

exynos78x0: pinctrl: set const to structs

PATCH In review Minkyu Kang 3 participants 3 messages Nov 4, 2021 – Nov 9, 2021 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20211104071928epcas1p37ed73c94cedf599fd39c60c0fc809f69@epcas1p3.samsung.com

#1 lore raw

PATCH 1/2 exynos78x0: pinctrl: set const to structs

to fix following checkpatch warings.
WARNING: struct should normally be const

Cc Dzmitry Sankouski <[email protected]>
---
 drivers/pinctrl/exynos/pinctrl-exynos78x0.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/pinctrl/exynos/pinctrl-exynos78x0.c +7 -7
index 01e9a4f..1b696fd 100644
@@ -19,12 +19,12 @@
 #include <asm/arch/pinmux.h>
 #include "pinctrl-exynos.h"
 
-static struct pinctrl_ops exynos78x0_pinctrl_ops = {
+static const struct pinctrl_ops exynos78x0_pinctrl_ops = {
 	.set_state	= exynos_pinctrl_set_state
 };
 
 /* pin banks of exynos78x0 pin-controller 0 (ALIVE) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
 	EXYNOS_PIN_BANK(6, 0x000, "etc0"),
 	EXYNOS_PIN_BANK(3, 0x020, "etc1"),
 	EXYNOS_PIN_BANK(8, 0x040, "gpa0"),
@@ -35,19 +35,19 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
 };
 
 /* pin banks of exynos78x0 pin-controller 1 (CCORE) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks1[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks1[] = {
 	EXYNOS_PIN_BANK(2, 0x000, "gpm0"),
 };
 
 /* pin banks of exynos78x0 pin-controller 2 (DISPAUD) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks2[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks2[] = {
 	EXYNOS_PIN_BANK(4, 0x000, "gpz0"),
 	EXYNOS_PIN_BANK(6, 0x020, "gpz1"),
 	EXYNOS_PIN_BANK(4, 0x040, "gpz2"),
 };
 
 /* pin banks of exynos78x0 pin-controller 4 (FSYS) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
 	EXYNOS_PIN_BANK(3, 0x000, "gpr0"),
 	EXYNOS_PIN_BANK(8, 0x020, "gpr1"),
 	EXYNOS_PIN_BANK(2, 0x040, "gpr2"),
@@ -56,7 +56,7 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
 };
 
 /* pin banks of exynos78x0 pin-controller 6 (TOP) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
 	EXYNOS_PIN_BANK(4, 0x000, "gpb0"),
 	EXYNOS_PIN_BANK(3, 0x020, "gpc0"),
 	EXYNOS_PIN_BANK(4, 0x040, "gpc1"),
@@ -78,7 +78,7 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
 	EXYNOS_PIN_BANK(5, 0x240, "gpf4"),
 };
 
-struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = {
+const struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = {
 	{
 		/* pin-controller instance 0 Alive data */
 		.pin_banks	= exynos78x0_pin_banks0,
Signature · 4 lines
1.9.1
-- 
Thanks,
Minkyu Kang.
Reviewed-by on v1 1/2
#2 lore raw
Quoted 5 lines · Minkyu Kang

to fix following checkpatch warings.
WARNING: struct should normally be const

Cc Dzmitry Sankouski <[email protected]>

Best Regards,
Jaehoon Chung

Quoted 65 lines
---
 drivers/pinctrl/exynos/pinctrl-exynos78x0.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/pinctrl/exynos/pinctrl-exynos78x0.c +7 -7
index 01e9a4f..1b696fd 100644
@@ -19,12 +19,12 @@
 #include <asm/arch/pinmux.h>
 #include "pinctrl-exynos.h"
 
-static struct pinctrl_ops exynos78x0_pinctrl_ops = {
+static const struct pinctrl_ops exynos78x0_pinctrl_ops = {
 	.set_state	= exynos_pinctrl_set_state
 };
 
 /* pin banks of exynos78x0 pin-controller 0 (ALIVE) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
 	EXYNOS_PIN_BANK(6, 0x000, "etc0"),
 	EXYNOS_PIN_BANK(3, 0x020, "etc1"),
 	EXYNOS_PIN_BANK(8, 0x040, "gpa0"),
@@ -35,19 +35,19 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
 };
 
 /* pin banks of exynos78x0 pin-controller 1 (CCORE) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks1[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks1[] = {
 	EXYNOS_PIN_BANK(2, 0x000, "gpm0"),
 };
 
 /* pin banks of exynos78x0 pin-controller 2 (DISPAUD) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks2[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks2[] = {
 	EXYNOS_PIN_BANK(4, 0x000, "gpz0"),
 	EXYNOS_PIN_BANK(6, 0x020, "gpz1"),
 	EXYNOS_PIN_BANK(4, 0x040, "gpz2"),
 };
 
 /* pin banks of exynos78x0 pin-controller 4 (FSYS) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
 	EXYNOS_PIN_BANK(3, 0x000, "gpr0"),
 	EXYNOS_PIN_BANK(8, 0x020, "gpr1"),
 	EXYNOS_PIN_BANK(2, 0x040, "gpr2"),
@@ -56,7 +56,7 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
 };
 
 /* pin banks of exynos78x0 pin-controller 6 (TOP) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
 	EXYNOS_PIN_BANK(4, 0x000, "gpb0"),
 	EXYNOS_PIN_BANK(3, 0x020, "gpc0"),
 	EXYNOS_PIN_BANK(4, 0x040, "gpc1"),
@@ -78,7 +78,7 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
 	EXYNOS_PIN_BANK(5, 0x240, "gpf4"),
 };
 
-struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = {
+const struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = {
 	{
 		/* pin-controller instance 0 Alive data */
 		.pin_banks	= exynos78x0_pin_banks0,
#3 lore raw
In reply to Minkyu Kang

2021년 11월 4일 (목) 16:20, Minkyu Kang <[email protected]>님이 작성:

Quoted 72 lines

to fix following checkpatch warings.
WARNING: struct should normally be const

Cc Dzmitry Sankouski <[email protected]>
---
 drivers/pinctrl/exynos/pinctrl-exynos78x0.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/pinctrl/exynos/pinctrl-exynos78x0.c +5 -5
index 01e9a4f..1b696fd 100644
@@ -19,12 +19,12 @@
 #include <asm/arch/pinmux.h>
 #include "pinctrl-exynos.h"
 
-static struct pinctrl_ops exynos78x0_pinctrl_ops = {
+static const struct pinctrl_ops exynos78x0_pinctrl_ops = {
        .set_state      = exynos_pinctrl_set_state
 };
 
 /* pin banks of exynos78x0 pin-controller 0 (ALIVE) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks0[] = {
        EXYNOS_PIN_BANK(6, 0x000, "etc0"),
        EXYNOS_PIN_BANK(3, 0x020, "etc1"),
        EXYNOS_PIN_BANK(8, 0x040, "gpa0"),
@@ -35,19 +35,19 @@ static struct samsung_pin_bank_data
 exynos78x0_pin_banks0[] = {
 };
 
 /* pin banks of exynos78x0 pin-controller 1 (CCORE) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks1[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks1[] = {
        EXYNOS_PIN_BANK(2, 0x000, "gpm0"),
 };
 
 /* pin banks of exynos78x0 pin-controller 2 (DISPAUD) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks2[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks2[] = {
        EXYNOS_PIN_BANK(4, 0x000, "gpz0"),
        EXYNOS_PIN_BANK(6, 0x020, "gpz1"),
        EXYNOS_PIN_BANK(4, 0x040, "gpz2"),
 };
 
 /* pin banks of exynos78x0 pin-controller 4 (FSYS) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks4[] = {
        EXYNOS_PIN_BANK(3, 0x000, "gpr0"),
        EXYNOS_PIN_BANK(8, 0x020, "gpr1"),
        EXYNOS_PIN_BANK(2, 0x040, "gpr2"),
drivers/pinctrl/exynos/pinctrl-exynos78x0.c +1 -1
@@ -56,7 +56,7 @@ static struct samsung_pin_bank_data
 exynos78x0_pin_banks4[] = {
 };
 
 /* pin banks of exynos78x0 pin-controller 6 (TOP) */
-static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
+static const struct samsung_pin_bank_data exynos78x0_pin_banks6[] = {
        EXYNOS_PIN_BANK(4, 0x000, "gpb0"),
        EXYNOS_PIN_BANK(3, 0x020, "gpc0"),
        EXYNOS_PIN_BANK(4, 0x040, "gpc1"),
drivers/pinctrl/exynos/pinctrl-exynos78x0.c +1 -1
@@ -78,7 +78,7 @@ static struct samsung_pin_bank_data
 exynos78x0_pin_banks6[] = {
        EXYNOS_PIN_BANK(5, 0x240, "gpf4"),
 };
 
-struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = {
+const struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = {
        {
                /* pin-controller instance 0 Alive data */
Quoted 7 lines

.pin_banks = exynos78x0_pin_banks0,
--
1.9.1
--
Thanks,
Minkyu Kang.

applied to u-boot-samsung.

Thanks.

Signature · 1 line
Thanks. Minkyu Kang.