Skip to contentSkip to conversation

staging: vme_user: fix CamelCase macros by converting to uppercase with underscores

PATCH In review Lucas Faria Mendes 2 participants 2 messages May 27 – May 28

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

PATCH 1/1 staging: vme_user: fix CamelCase macros by converting to uppercase with underscores

Fix the following CHECK style issues reported by checkpatch.pl:
Avoid CamelCase: <VME_2eVME>
Avoid CamelCase: <VME_2eSST>
Avoid CamelCase: <VME_2eSSTB>
Avoid CamelCase: <VME_2eSST160>
Avoid CamelCase: <VME_2eSST267>
Avoid CamelCase: <VME_2eSST320>

Convert the lowercase 'e' to uppercase 'E' and separate the protocol naming elements using underscores (e.g., VME_2E_VME). Update all macro definitions in vme.h and their respective usages across the driver files to comply with the Linux kernel coding style.

drivers/staging/vme_user/vme.h +6 -6
index b6413605e..03b7b11c1 100644
@@ -33,13 +33,13 @@ enum vme_resource_type {
 #define VME_SCT		0x1
 #define VME_BLT		0x2
 #define VME_MBLT	0x4
-#define VME_2eVME	0x8
-#define VME_2eSST	0x10
-#define VME_2eSSTB	0x20
+#define VME_2E_VME	0x8
+#define VME_2E_SST	0x10
+#define VME_2E_SSTB	0x20
 
-#define VME_2eSST160	0x100
-#define VME_2eSST267	0x200
-#define VME_2eSST320	0x400
+#define VME_2E_SST160	0x100
+#define VME_2E_SST267	0x200
+#define VME_2E_SST320	0x400
 
 #define	VME_SUPER	0x1000
 #define	VME_USER	0x2000
drivers/staging/vme_user/vme_fake.c +4 -4
index 8abaa3165..ac0871fc1 100644
@@ -1114,8 +1114,8 @@ static int __init fake_init(void)
 		master_image->address_attr = VME_A16 | VME_A24 | VME_A32 |
 			VME_A64;
 		master_image->cycle_attr = VME_SCT | VME_BLT | VME_MBLT |
-			VME_2eVME | VME_2eSST | VME_2eSSTB | VME_2eSST160 |
-			VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER |
+			VME_2E_VME | VME_2E_SST | VME_2E_SSTB | VME_2E_SST160 |
+			VME_2E_SST267 | VME_2E_SST320 | VME_SUPER | VME_USER |
 			VME_PROG | VME_DATA;
 		master_image->width_attr = VME_D16 | VME_D32;
 		memset(&master_image->bus_resource, 0,
@@ -1141,8 +1141,8 @@ static int __init fake_init(void)
 			VME_A64 | VME_CRCSR | VME_USER1 | VME_USER2 |
 			VME_USER3 | VME_USER4;
 		slave_image->cycle_attr = VME_SCT | VME_BLT | VME_MBLT |
-			VME_2eVME | VME_2eSST | VME_2eSSTB | VME_2eSST160 |
-			VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER |
+			VME_2E_VME | VME_2E_SST | VME_2E_SSTB | VME_2E_SST160 |
+			VME_2E_SST267 | VME_2E_SST320 | VME_SUPER | VME_USER |
 			VME_PROG | VME_DATA;
 		list_add_tail(&slave_image->list,
 			      &fake_bridge->slave_resources);
drivers/staging/vme_user/vme_tsi148.c +44 -44

212 lines not on this page · raw message

---
 drivers/staging/vme_user/vme.h        | 12 ++--
 drivers/staging/vme_user/vme_fake.c   |  8 +--
 drivers/staging/vme_user/vme_tsi148.c | 88 +++++++++++++--------------
 3 files changed, 54 insertions(+), 54 deletions(-)
drivers/staging/vme_user/vme.h +6 -6
index b6413605e..03b7b11c1 100644
@@ -33,13 +33,13 @@ enum vme_resource_type {
 #define VME_SCT		0x1
 #define VME_BLT		0x2
 #define VME_MBLT	0x4
-#define VME_2eVME	0x8
-#define VME_2eSST	0x10
-#define VME_2eSSTB	0x20
+#define VME_2E_VME	0x8
+#define VME_2E_SST	0x10
+#define VME_2E_SSTB	0x20
 
-#define VME_2eSST160	0x100
-#define VME_2eSST267	0x200
-#define VME_2eSST320	0x400
+#define VME_2E_SST160	0x100
+#define VME_2E_SST267	0x200
+#define VME_2E_SST320	0x400
 
 #define	VME_SUPER	0x1000
 #define	VME_USER	0x2000
drivers/staging/vme_user/vme_fake.c +4 -4
index 8abaa3165..ac0871fc1 100644
@@ -1114,8 +1114,8 @@ static int __init fake_init(void)
 		master_image->address_attr = VME_A16 | VME_A24 | VME_A32 |
 			VME_A64;
 		master_image->cycle_attr = VME_SCT | VME_BLT | VME_MBLT |
-			VME_2eVME | VME_2eSST | VME_2eSSTB | VME_2eSST160 |
-			VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER |
+			VME_2E_VME | VME_2E_SST | VME_2E_SSTB | VME_2E_SST160 |
+			VME_2E_SST267 | VME_2E_SST320 | VME_SUPER | VME_USER |
 			VME_PROG | VME_DATA;
 		master_image->width_attr = VME_D16 | VME_D32;
 		memset(&master_image->bus_resource, 0,
@@ -1141,8 +1141,8 @@ static int __init fake_init(void)
 			VME_A64 | VME_CRCSR | VME_USER1 | VME_USER2 |
 			VME_USER3 | VME_USER4;
 		slave_image->cycle_attr = VME_SCT | VME_BLT | VME_MBLT |
-			VME_2eVME | VME_2eSST | VME_2eSSTB | VME_2eSST160 |
-			VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER |
+			VME_2E_VME | VME_2E_SST | VME_2E_SSTB | VME_2E_SST160 |
+			VME_2E_SST267 | VME_2E_SST320 | VME_SUPER | VME_USER |
 			VME_PROG | VME_DATA;
 		list_add_tail(&slave_image->list,
 			      &fake_bridge->slave_resources);
drivers/staging/vme_user/vme_tsi148.c +44 -44

212 lines not on this page · raw message

Signature · 1 line
2.53.0
#1 lore raw
Quoted 8 lines · Lucas Faria Mendes

Fix the following CHECK style issues reported by checkpatch.pl:
Avoid CamelCase: <VME_2eVME>
Avoid CamelCase: <VME_2eSST>
Avoid CamelCase: <VME_2eSSTB>
Avoid CamelCase: <VME_2eSST160>
Avoid CamelCase: <VME_2eSST267>
Avoid CamelCase: <VME_2eSST320>

Quoted 5 lines

Convert the lowercase 'e' to uppercase 'E' and separate the protocol naming elements using underscores (e.g., VME_2E_VME). Update all macro definitions in vme.h and their respective usages across the driver files to comply with the Linux kernel coding style.

No. The original is the correct way. Here correctness is more important than the CamelCase rule.

regards,
dan carpenter