Skip to contentSkip to conversation

mtd: remove c++ comments from uapi header

PATCH In review Arnd Bergmann 2 participants 3 messages Jul 8, 2019 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: remove c++ comments from uapi header

Checking the uapi headers now produces a warning with clang:

./usr/include/mtd/mtd-abi.h:116:28: error: // comments are not allowed in this language [-Werror,-Wcomment]

Change these into standard C comments here.

---
 include/uapi/mtd/mtd-abi.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/uapi/mtd/mtd-abi.h +5 -5
index aff5b5e59845..47ffe3208c27 100644
@@ -113,11 +113,11 @@ struct mtd_write_req {
 #define MTD_CAP_NVRAM		(MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
 
 /* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
-#define MTD_NANDECC_OFF		0	// Switch off ECC (Not recommended)
-#define MTD_NANDECC_PLACE	1	// Use the given placement in the structure (YAFFS1 legacy mode)
-#define MTD_NANDECC_AUTOPLACE	2	// Use the default placement scheme
-#define MTD_NANDECC_PLACEONLY	3	// Use the given placement in the structure (Do not store ecc result on read)
-#define MTD_NANDECC_AUTOPL_USR 	4	// Use the given autoplacement scheme rather than using the default
+#define MTD_NANDECC_OFF		0	/* Switch off ECC (Not recommended) */
+#define MTD_NANDECC_PLACE	1	/* Use the given placement in the structure (YAFFS1 legacy mode) */
+#define MTD_NANDECC_AUTOPLACE	2	/* Use the default placement scheme */
+#define MTD_NANDECC_PLACEONLY	3	/* Use the given placement in the structure (Do not store ecc result on read) */
+#define MTD_NANDECC_AUTOPL_USR 	4	/* Use the given autoplacement scheme rather than using the default */
 
 /* OTP mode selection */
 #define MTD_OTP_OFF		0
Signature · 1 line
2.20.0
maintainer
#1 lore raw

Hi Arnd,

Arnd Bergmann <[email protected]> wrote on Mon, 8 Jul 2019 14:49:39 +0200:

Quoted 22 lines

Checking the uapi headers now produces a warning with clang:

./usr/include/mtd/mtd-abi.h:116:28: error: // comments are not allowed in this language [-Werror,-Wcomment]

Change these into standard C comments here.

---
 include/uapi/mtd/mtd-abi.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/uapi/mtd/mtd-abi.h +0 -3
index aff5b5e59845..47ffe3208c27 100644
@@ -113,11 +113,11 @@ struct mtd_write_req {
 #define MTD_CAP_NVRAM		(MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
 
 /* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
-#define MTD_NANDECC_OFF		0	// Switch off ECC (Not recommended)
-#define MTD_NANDECC_PLACE	1	// Use the given placement in the structure (YAFFS1 legacy mode)
-#define MTD_NANDECC_AUTOPLACE	2	// Use the default placement scheme

include/uapi/mtd/mtd-abi.h struct mtd_write_req { · line 123

Quoted 10 lines
include/uapi/mtd/mtd-abi.h +5 -2
-#define MTD_NANDECC_PLACEONLY	3	// Use the given placement in the structure (Do not store ecc result on read)
-#define MTD_NANDECC_AUTOPL_USR 	4	// Use the given autoplacement scheme rather than using the default
+#define MTD_NANDECC_OFF		0	/* Switch off ECC (Not recommended) */
+#define MTD_NANDECC_PLACE	1	/* Use the given placement in the structure (YAFFS1 legacy mode) */
+#define MTD_NANDECC_AUTOPLACE	2	/* Use the default placement scheme */
+#define MTD_NANDECC_PLACEONLY	3	/* Use the given placement in the structure (Do not store ecc result on read) */
+#define MTD_NANDECC_AUTOPL_USR 	4	/* Use the given autoplacement scheme rather than using the default */
 
 /* OTP mode selection */
 #define MTD_OTP_OFF		0

A similar patch has been sent a few weeks ago and has been applied yesterday night so it should have appeared this morning in linux-next :)

Thanks anyway!
Miquèl

#2 lore raw
Quoted 5 lines · Miquel Raynal

Arnd Bergmann <[email protected]> wrote on Mon, 8 Jul 2019 14:49:39 +0200:

A similar patch has been sent a few weeks ago and has been applied yesterday night so it should have appeared this morning in linux-next :)

Ok, got it. I had rebased to the latest linux-next this morning and then created the patch when I saw the bug for the first time, but it turns out that this was still Friday's kernel and after rebasing again, it is indeed fixed.

Arnd