Skip to contentSkip to conversation

Staging:wilc1000:coreconfigurator.h Remove an unnecessary typedef keyword

PATCH In review Muraru Mihaela 3 participants 3 messages Feb 29, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging:wilc1000:coreconfigurator.h Remove an unnecessary typedef keyword

This patch fixes these warning messages found by checkpatch.pl:
WARNING: do not add new typedefs

---
 drivers/staging/wilc1000/coreconfigurator.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +2 -2
index 63eca24..1e1892f 100644
@@ -50,7 +50,7 @@
 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
 
-typedef enum {
+enum {
 	SUCCESSFUL_STATUSCODE    = 0,
 	UNSPEC_FAIL              = 1,
 	UNSUP_CAP                = 10,
@@ -70,7 +70,7 @@ typedef enum {
 	CONNECT_STS_FORCE_16_BIT = 0xFFFF
 } tenuConnectSts;
 
-typedef struct {
+struct {
 	u8 u8Full;
 	u8 u8Index;
 	s8 as8RSSI[NUM_RSSI];
Signature · 1 line
1.9.1
#1 lore raw

I don't think this is correct. Look into the meaning of typedef.

julia

Quoted 40 lines · Muraru Mihaela

This patch fixes these warning messages found by checkpatch.pl:
WARNING: do not add new typedefs

---
 drivers/staging/wilc1000/coreconfigurator.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +2 -3
index 63eca24..1e1892f 100644
@@ -50,7 +50,7 @@
 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
 
-typedef enum {
+enum {
 	SUCCESSFUL_STATUSCODE    = 0,
 	UNSPEC_FAIL              = 1,
 	UNSUP_CAP                = 10,
@@ -70,7 +70,7 @@ typedef enum {
 	CONNECT_STS_FORCE_16_BIT = 0xFFFF
 } tenuConnectSts;
 
-typedef struct {
+struct {
 	u8 u8Full;
 	u8 u8Index;
 	s8 as8RSSI[NUM_RSSI];
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160229111620.GA9474%40domino-MS-16Y1.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
In reply to Muraru Mihaela
Quoted 22 lines · Muraru Mihaela

This patch fixes these warning messages found by checkpatch.pl:
WARNING: do not add new typedefs

---
 drivers/staging/wilc1000/coreconfigurator.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +1 -1
index 63eca24..1e1892f 100644
@@ -50,7 +50,7 @@
 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
 
-typedef enum {
+enum {
        SUCCESSFUL_STATUSCODE    = 0,
        UNSPEC_FAIL              = 1,
        UNSUP_CAP                = 10,

drivers/staging/wilc1000/coreconfigurator.h typedef enum { · line 76

Quoted 8 lines
drivers/staging/wilc1000/coreconfigurator.h +1 -1
@@ -70,7 +70,7 @@ typedef enum {
        CONNECT_STS_FORCE_16_BIT = 0xFFFF
 } tenuConnectSts;
 
-typedef struct {
+struct {
        u8 u8Full;
        u8 u8Index;
        s8 as8RSSI[NUM_RSSI];

Also, please re-compile the code before sending a patch :)

Have a look at http://kernelnewbies.org/Outreachyfirstpatch in the section:
"Compiling only part of the kernel".

Daniel.