All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] net: netfilters: Remove typedef
@ 2017-03-25 12:27 Arushi Singhal
  2017-03-25 12:27 ` [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t" Arushi Singhal
  2017-03-25 12:27 ` [PATCH 2/2] net: netfilter: Remove typedef from "typedef struct bitstr_t" Arushi Singhal
  0 siblings, 2 replies; 5+ messages in thread
From: Arushi Singhal @ 2017-03-25 12:27 UTC (permalink / raw)
  To: kadlec
  Cc: pablo, davem, outreachy-kernel, netfilter-devel, coreteam,
	gregkh, netdev, linux-kernel, Arushi Singhal

Remove typedef from struct.

Arushi Singhal (2):
  net: netfilter: Remove typedef from "typedef struct field_t"
  net: netfilter: Remove typedef from "typedef struct bitstr_t"

 net/netfilter/nf_conntrack_h323_asn1.c | 98 +++++++++++++++++-----------------
 1 file changed, 49 insertions(+), 49 deletions(-)

-- 
This is my contribition to outreachy project nftables.

2.11.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t"
  2017-03-25 12:27 [PATCH 0/2] net: netfilters: Remove typedef Arushi Singhal
@ 2017-03-25 12:27 ` Arushi Singhal
  2017-03-27  1:25   ` kbuild test robot
  2017-04-06 16:26   ` Pablo Neira Ayuso
  2017-03-25 12:27 ` [PATCH 2/2] net: netfilter: Remove typedef from "typedef struct bitstr_t" Arushi Singhal
  1 sibling, 2 replies; 5+ messages in thread
From: Arushi Singhal @ 2017-03-25 12:27 UTC (permalink / raw)
  To: kadlec
  Cc: pablo, davem, outreachy-kernel, netfilter-devel, coreteam,
	gregkh, netdev, linux-kernel, Arushi Singhal

This patch removes typedefs from struct and renames it from "typedef struct
field_t" to "struct field" as per kernel coding standards."

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 net/netfilter/nf_conntrack_h323_asn1.c | 68 +++++++++++++++++-----------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/net/netfilter/nf_conntrack_h323_asn1.c b/net/netfilter/nf_conntrack_h323_asn1.c
index 89b2e46925c4..fb8cf238a76f 100644
--- a/net/netfilter/nf_conntrack_h323_asn1.c
+++ b/net/netfilter/nf_conntrack_h323_asn1.c
@@ -77,7 +77,7 @@
 
 
 /* ASN.1 Field Structure */
-typedef struct field_t {
+struct field {
 #if H323_TRACE
 	char *name;
 #endif
@@ -87,8 +87,8 @@ typedef struct field_t {
 	unsigned char ub;
 	unsigned short attr;
 	unsigned short offset;
-	const struct field_t *fields;
-} field_t;
+	const struct field *fields;
+};
 
 /* Bit Stream */
 typedef struct {
@@ -111,21 +111,21 @@ static unsigned int get_bitmap(bitstr_t *bs, unsigned int b);
 static unsigned int get_uint(bitstr_t *bs, int b);
 
 /* Decoder Functions */
-static int decode_nul(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_bool(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_oid(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_int(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_enum(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_bitstr(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_numstr(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_octstr(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_bmpstr(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_seq(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_seqof(bitstr_t *bs, const struct field_t *f, char *base, int level);
-static int decode_choice(bitstr_t *bs, const struct field_t *f, char *base, int level);
+static int decode_nul(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_bool(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_oid(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_int(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_enum(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_bitstr(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_numstr(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_octstr(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_bmpstr(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_seq(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_seqof(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_choice(bitstr_t *bs, const struct field *f, char *base, int level);
 
 /* Decoder Functions Vector */
-typedef int (*decoder_t)(bitstr_t *, const struct field_t *, char *, int);
+typedef int (*decoder_t)(bitstr_t *, const struct field *, char *, int);
 static const decoder_t Decoders[] = {
 	decode_nul,
 	decode_bool,
@@ -264,7 +264,7 @@ static unsigned int get_uint(bitstr_t *bs, int b)
 }
 
 /****************************************************************************/
-static int decode_nul(bitstr_t *bs, const struct field_t *f,
+static int decode_nul(bitstr_t *bs, const struct field *f,
                       char *base, int level)
 {
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -273,7 +273,7 @@ static int decode_nul(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_bool(bitstr_t *bs, const struct field_t *f,
+static int decode_bool(bitstr_t *bs, const struct field *f,
                        char *base, int level)
 {
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -285,7 +285,7 @@ static int decode_bool(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_oid(bitstr_t *bs, const struct field_t *f,
+static int decode_oid(bitstr_t *bs, const struct field *f,
                       char *base, int level)
 {
 	int len;
@@ -302,7 +302,7 @@ static int decode_oid(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_int(bitstr_t *bs, const struct field_t *f,
+static int decode_int(bitstr_t *bs, const struct field *f,
                       char *base, int level)
 {
 	unsigned int len;
@@ -346,7 +346,7 @@ static int decode_int(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_enum(bitstr_t *bs, const struct field_t *f,
+static int decode_enum(bitstr_t *bs, const struct field *f,
                        char *base, int level)
 {
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -362,7 +362,7 @@ static int decode_enum(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_bitstr(bitstr_t *bs, const struct field_t *f,
+static int decode_bitstr(bitstr_t *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -396,7 +396,7 @@ static int decode_bitstr(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_numstr(bitstr_t *bs, const struct field_t *f,
+static int decode_numstr(bitstr_t *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -414,7 +414,7 @@ static int decode_numstr(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_octstr(bitstr_t *bs, const struct field_t *f,
+static int decode_octstr(bitstr_t *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -463,7 +463,7 @@ static int decode_octstr(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_bmpstr(bitstr_t *bs, const struct field_t *f,
+static int decode_bmpstr(bitstr_t *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -489,12 +489,12 @@ static int decode_bmpstr(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_seq(bitstr_t *bs, const struct field_t *f,
+static int decode_seq(bitstr_t *bs, const struct field *f,
                       char *base, int level)
 {
 	unsigned int ext, bmp, i, opt, len = 0, bmp2, bmp2_len;
 	int err;
-	const struct field_t *son;
+	const struct field *son;
 	unsigned char *beg = NULL;
 
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -606,12 +606,12 @@ static int decode_seq(bitstr_t *bs, const struct field_t *f,
 }
 
 /****************************************************************************/
-static int decode_seqof(bitstr_t *bs, const struct field_t *f,
+static int decode_seqof(bitstr_t *bs, const struct field *f,
                         char *base, int level)
 {
 	unsigned int count, effective_count = 0, i, len = 0;
 	int err;
-	const struct field_t *son;
+	const struct field *son;
 	unsigned char *beg = NULL;
 
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -696,12 +696,12 @@ static int decode_seqof(bitstr_t *bs, const struct field_t *f,
 
 
 /****************************************************************************/
-static int decode_choice(bitstr_t *bs, const struct field_t *f,
+static int decode_choice(bitstr_t *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int type, ext, len = 0;
 	int err;
-	const struct field_t *son;
+	const struct field *son;
 	unsigned char *beg = NULL;
 
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -768,7 +768,7 @@ static int decode_choice(bitstr_t *bs, const struct field_t *f,
 /****************************************************************************/
 int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage *ras)
 {
-	static const struct field_t ras_message = {
+	static const struct field ras_message = {
 		FNAME("RasMessage") CHOICE, 5, 24, 32, DECODE | EXT,
 		0, _RasMessage
 	};
@@ -785,7 +785,7 @@ int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage *ras)
 static int DecodeH323_UserInformation(unsigned char *buf, unsigned char *beg,
 				      size_t sz, H323_UserInformation *uuie)
 {
-	static const struct field_t h323_userinformation = {
+	static const struct field h323_userinformation = {
 		FNAME("H323-UserInformation") SEQ, 1, 2, 2, DECODE | EXT,
 		0, _H323_UserInformation
 	};
@@ -804,7 +804,7 @@ int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz,
 					 MultimediaSystemControlMessage *
 					 mscm)
 {
-	static const struct field_t multimediasystemcontrolmessage = {
+	static const struct field multimediasystemcontrolmessage = {
 		FNAME("MultimediaSystemControlMessage") CHOICE, 2, 4, 4,
 		DECODE | EXT, 0, _MultimediaSystemControlMessage
 	};
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] net: netfilter: Remove typedef from "typedef struct bitstr_t"
  2017-03-25 12:27 [PATCH 0/2] net: netfilters: Remove typedef Arushi Singhal
  2017-03-25 12:27 ` [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t" Arushi Singhal
@ 2017-03-25 12:27 ` Arushi Singhal
  1 sibling, 0 replies; 5+ messages in thread
From: Arushi Singhal @ 2017-03-25 12:27 UTC (permalink / raw)
  To: kadlec
  Cc: pablo, davem, outreachy-kernel, netfilter-devel, coreteam,
	gregkh, netdev, linux-kernel, Arushi Singhal

This patch removes typedefs from struct and renames it from "typedef struct
bitstr_t" to "struct bitstr" as per kernel coding standards."

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 net/netfilter/nf_conntrack_h323_asn1.c | 80 +++++++++++++++++-----------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/net/netfilter/nf_conntrack_h323_asn1.c b/net/netfilter/nf_conntrack_h323_asn1.c
index fb8cf238a76f..4502c0d6071d 100644
--- a/net/netfilter/nf_conntrack_h323_asn1.c
+++ b/net/netfilter/nf_conntrack_h323_asn1.c
@@ -91,41 +91,41 @@ struct field {
 };
 
 /* Bit Stream */
-typedef struct {
+struct bitstr {
 	unsigned char *buf;
 	unsigned char *beg;
 	unsigned char *end;
 	unsigned char *cur;
 	unsigned int bit;
-} bitstr_t;
+};
 
 /* Tool Functions */
 #define INC_BIT(bs) if((++(bs)->bit)>7){(bs)->cur++;(bs)->bit=0;}
 #define INC_BITS(bs,b) if(((bs)->bit+=(b))>7){(bs)->cur+=(bs)->bit>>3;(bs)->bit&=7;}
 #define BYTE_ALIGN(bs) if((bs)->bit){(bs)->cur++;(bs)->bit=0;}
 #define CHECK_BOUND(bs,n) if((bs)->cur+(n)>(bs)->end)return(H323_ERROR_BOUND)
-static unsigned int get_len(bitstr_t *bs);
-static unsigned int get_bit(bitstr_t *bs);
-static unsigned int get_bits(bitstr_t *bs, unsigned int b);
-static unsigned int get_bitmap(bitstr_t *bs, unsigned int b);
-static unsigned int get_uint(bitstr_t *bs, int b);
+static unsigned int get_len(struct bitstr *bs);
+static unsigned int get_bit(struct bitstr *bs);
+static unsigned int get_bits(struct bitstr *bs, unsigned int b);
+static unsigned int get_bitmap(struct bitstr *bs, unsigned int b);
+static unsigned int get_uint(struct bitstr *bs, int b);
 
 /* Decoder Functions */
-static int decode_nul(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_bool(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_oid(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_int(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_enum(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_bitstr(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_numstr(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_octstr(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_bmpstr(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_seq(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_seqof(bitstr_t *bs, const struct field *f, char *base, int level);
-static int decode_choice(bitstr_t *bs, const struct field *f, char *base, int level);
+static int decode_nul(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_bool(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_oid(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_int(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_enum(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_bitstr(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_numstr(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_octstr(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_bmpstr(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_seq(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_seqof(struct bitstr *bs, const struct field *f, char *base, int level);
+static int decode_choice(struct bitstr *bs, const struct field *f, char *base, int level);
 
 /* Decoder Functions Vector */
-typedef int (*decoder_t)(bitstr_t *, const struct field *, char *, int);
+typedef int (*decoder_t)(struct bitstr *, const struct field *, char *, int);
 static const decoder_t Decoders[] = {
 	decode_nul,
 	decode_bool,
@@ -150,7 +150,7 @@ static const decoder_t Decoders[] = {
  * Functions
  ****************************************************************************/
 /* Assume bs is aligned && v < 16384 */
-static unsigned int get_len(bitstr_t *bs)
+static unsigned int get_len(struct bitstr *bs)
 {
 	unsigned int v;
 
@@ -166,7 +166,7 @@ static unsigned int get_len(bitstr_t *bs)
 }
 
 /****************************************************************************/
-static unsigned int get_bit(bitstr_t *bs)
+static unsigned int get_bit(struct bitstr *bs)
 {
 	unsigned int b = (*bs->cur) & (0x80 >> bs->bit);
 
@@ -177,7 +177,7 @@ static unsigned int get_bit(bitstr_t *bs)
 
 /****************************************************************************/
 /* Assume b <= 8 */
-static unsigned int get_bits(bitstr_t *bs, unsigned int b)
+static unsigned int get_bits(struct bitstr *bs, unsigned int b)
 {
 	unsigned int v, l;
 
@@ -203,7 +203,7 @@ static unsigned int get_bits(bitstr_t *bs, unsigned int b)
 
 /****************************************************************************/
 /* Assume b <= 32 */
-static unsigned int get_bitmap(bitstr_t *bs, unsigned int b)
+static unsigned int get_bitmap(struct bitstr *bs, unsigned int b)
 {
 	unsigned int v, l, shift, bytes;
 
@@ -242,7 +242,7 @@ static unsigned int get_bitmap(bitstr_t *bs, unsigned int b)
 /****************************************************************************
  * Assume bs is aligned and sizeof(unsigned int) == 4
  ****************************************************************************/
-static unsigned int get_uint(bitstr_t *bs, int b)
+static unsigned int get_uint(struct bitstr *bs, int b)
 {
 	unsigned int v = 0;
 
@@ -264,7 +264,7 @@ static unsigned int get_uint(bitstr_t *bs, int b)
 }
 
 /****************************************************************************/
-static int decode_nul(bitstr_t *bs, const struct field *f,
+static int decode_nul(struct bitstr *bs, const struct field *f,
                       char *base, int level)
 {
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -273,7 +273,7 @@ static int decode_nul(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_bool(bitstr_t *bs, const struct field *f,
+static int decode_bool(struct bitstr *bs, const struct field *f,
                        char *base, int level)
 {
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -285,7 +285,7 @@ static int decode_bool(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_oid(bitstr_t *bs, const struct field *f,
+static int decode_oid(struct bitstr *bs, const struct field *f,
                       char *base, int level)
 {
 	int len;
@@ -302,7 +302,7 @@ static int decode_oid(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_int(bitstr_t *bs, const struct field *f,
+static int decode_int(struct bitstr *bs, const struct field *f,
                       char *base, int level)
 {
 	unsigned int len;
@@ -346,7 +346,7 @@ static int decode_int(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_enum(bitstr_t *bs, const struct field *f,
+static int decode_enum(struct bitstr *bs, const struct field *f,
                        char *base, int level)
 {
 	PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name);
@@ -362,7 +362,7 @@ static int decode_enum(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_bitstr(bitstr_t *bs, const struct field *f,
+static int decode_bitstr(struct bitstr *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -396,7 +396,7 @@ static int decode_bitstr(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_numstr(bitstr_t *bs, const struct field *f,
+static int decode_numstr(struct bitstr *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -414,7 +414,7 @@ static int decode_numstr(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_octstr(bitstr_t *bs, const struct field *f,
+static int decode_octstr(struct bitstr *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -463,7 +463,7 @@ static int decode_octstr(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_bmpstr(bitstr_t *bs, const struct field *f,
+static int decode_bmpstr(struct bitstr *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int len;
@@ -489,7 +489,7 @@ static int decode_bmpstr(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_seq(bitstr_t *bs, const struct field *f,
+static int decode_seq(struct bitstr *bs, const struct field *f,
                       char *base, int level)
 {
 	unsigned int ext, bmp, i, opt, len = 0, bmp2, bmp2_len;
@@ -606,7 +606,7 @@ static int decode_seq(bitstr_t *bs, const struct field *f,
 }
 
 /****************************************************************************/
-static int decode_seqof(bitstr_t *bs, const struct field *f,
+static int decode_seqof(struct bitstr *bs, const struct field *f,
                         char *base, int level)
 {
 	unsigned int count, effective_count = 0, i, len = 0;
@@ -696,7 +696,7 @@ static int decode_seqof(bitstr_t *bs, const struct field *f,
 
 
 /****************************************************************************/
-static int decode_choice(bitstr_t *bs, const struct field *f,
+static int decode_choice(struct bitstr *bs, const struct field *f,
                          char *base, int level)
 {
 	unsigned int type, ext, len = 0;
@@ -772,7 +772,7 @@ int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage *ras)
 		FNAME("RasMessage") CHOICE, 5, 24, 32, DECODE | EXT,
 		0, _RasMessage
 	};
-	bitstr_t bs;
+	struct bitstr bs;
 
 	bs.buf = bs.beg = bs.cur = buf;
 	bs.end = buf + sz;
@@ -789,7 +789,7 @@ static int DecodeH323_UserInformation(unsigned char *buf, unsigned char *beg,
 		FNAME("H323-UserInformation") SEQ, 1, 2, 2, DECODE | EXT,
 		0, _H323_UserInformation
 	};
-	bitstr_t bs;
+	struct bitstr bs;
 
 	bs.buf = buf;
 	bs.beg = bs.cur = beg;
@@ -808,7 +808,7 @@ int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz,
 		FNAME("MultimediaSystemControlMessage") CHOICE, 2, 4, 4,
 		DECODE | EXT, 0, _MultimediaSystemControlMessage
 	};
-	bitstr_t bs;
+	struct bitstr bs;
 
 	bs.buf = bs.beg = bs.cur = buf;
 	bs.end = buf + sz;
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t"
  2017-03-25 12:27 ` [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t" Arushi Singhal
@ 2017-03-27  1:25   ` kbuild test robot
  2017-04-06 16:26   ` Pablo Neira Ayuso
  1 sibling, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2017-03-27  1:25 UTC (permalink / raw)
  To: Arushi Singhal
  Cc: kbuild-all, kadlec, pablo, davem, outreachy-kernel,
	netfilter-devel, coreteam, gregkh, netdev, linux-kernel,
	Arushi Singhal

[-- Attachment #1: Type: text/plain, Size: 10271 bytes --]

Hi Arushi,

[auto build test ERROR on nf-next/master]
[also build test ERROR on v4.11-rc4 next-20170324]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arushi-Singhal/net-netfilters-Remove-typedef/20170327-073013
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   In file included from net/netfilter/nf_conntrack_h323_asn1.c:147:0:
>> net/netfilter/nf_conntrack_h323_types.c:8:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress_ipAddress[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:14:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress_ipSourceRoute_route[] = { /* SEQUENCE OF */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:18:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress_ipSourceRoute_routing[] = { /* CHOICE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:23:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress_ipSourceRoute[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:32:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress_ipxAddress[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:38:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress_ip6Address[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:44:29: error: array type has incomplete element type
    static const struct field_t _H221NonStandard[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:50:29: error: array type has incomplete element type
    static const struct field_t _NonStandardIdentifier[] = { /* CHOICE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:56:29: error: array type has incomplete element type
    static const struct field_t _NonStandardParameter[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:62:29: error: array type has incomplete element type
    static const struct field_t _TransportAddress[] = { /* CHOICE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:78:29: error: array type has incomplete element type
    static const struct field_t _AliasAddress[] = { /* CHOICE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:88:29: error: array type has incomplete element type
    static const struct field_t _Setup_UUIE_sourceAddress[] = { /* SEQUENCE OF */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:92:29: error: array type has incomplete element type
    static const struct field_t _VendorIdentifier[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:98:29: error: array type has incomplete element type
    static const struct field_t _GatekeeperInfo[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:103:29: error: array type has incomplete element type
    static const struct field_t _H310Caps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:110:29: error: array type has incomplete element type
    static const struct field_t _H320Caps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:117:29: error: array type has incomplete element type
    static const struct field_t _H321Caps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:124:29: error: array type has incomplete element type
    static const struct field_t _H322Caps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:131:29: error: array type has incomplete element type
    static const struct field_t _H323Caps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:138:29: error: array type has incomplete element type
    static const struct field_t _H324Caps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:145:29: error: array type has incomplete element type
    static const struct field_t _VoiceCaps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:152:29: error: array type has incomplete element type
    static const struct field_t _T120OnlyCaps[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:159:29: error: array type has incomplete element type
    static const struct field_t _SupportedProtocols[] = { /* CHOICE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:174:29: error: array type has incomplete element type
    static const struct field_t _GatewayInfo_protocol[] = { /* SEQUENCE OF */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:178:29: error: array type has incomplete element type
    static const struct field_t _GatewayInfo[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:185:29: error: array type has incomplete element type
    static const struct field_t _McuInfo[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:191:29: error: array type has incomplete element type
    static const struct field_t _TerminalInfo[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:196:29: error: array type has incomplete element type
    static const struct field_t _EndpointType[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:213:29: error: array type has incomplete element type
    static const struct field_t _Setup_UUIE_destinationAddress[] = { /* SEQUENCE OF */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:217:29: error: array type has incomplete element type
    static const struct field_t _Setup_UUIE_destExtraCallInfo[] = { /* SEQUENCE OF */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:221:29: error: array type has incomplete element type
    static const struct field_t _Setup_UUIE_destExtraCRV[] = { /* SEQUENCE OF */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:225:29: error: array type has incomplete element type
    static const struct field_t _Setup_UUIE_conferenceGoal[] = { /* CHOICE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:234:29: error: array type has incomplete element type
    static const struct field_t _Q954Details[] = { /* SEQUENCE */
                                ^
   net/netfilter/nf_conntrack_h323_types.c:239:29: error: array type has incomplete element type
    static const struct field_t _QseriesOptions[] = { /* SEQUENCE */

vim +8 net/netfilter/nf_conntrack_h323_types.c

d05291868 net/netfilter/nf_conntrack_h323_types.c             Jing Min Zhao  2007-05-24   1  /* Generated by Jing Min Zhao's ASN.1 parser, May 16 2007
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   2   *
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   3   * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net>
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   4   *
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   5   * This source code is licensed under General Public License version 2.
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   6   */
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   7  
905e3e8ec net/netfilter/nf_conntrack_h323_types.c             Jan Engelhardt 2008-01-31  @8  static const struct field_t _TransportAddress_ipAddress[] = {	/* SEQUENCE */
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20   9  	{FNAME("ip") OCTSTR, FIXD, 4, 0, DECODE,
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20  10  	 offsetof(TransportAddress_ipAddress, ip), NULL},
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20  11  	{FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL},
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20  12  };
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20  13  
905e3e8ec net/netfilter/nf_conntrack_h323_types.c             Jan Engelhardt 2008-01-31  14  static const struct field_t _TransportAddress_ipSourceRoute_route[] = {	/* SEQUENCE OF */
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20  15  	{FNAME("item") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL},
5e35941d9 net/ipv4/netfilter/ip_conntrack_helper_h323_types.c Jing Min Zhao  2006-03-20  16  };

:::::: The code at line 8 was first introduced by commit
:::::: 905e3e8ec5899ae618846c9ac6f38dd6c22e604e [NETFILTER]: nf_conntrack_h323: constify and annotate H.323 helper

:::::: TO: Jan Engelhardt <jengelh@computergmbh.de>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 49272 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t"
  2017-03-25 12:27 ` [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t" Arushi Singhal
  2017-03-27  1:25   ` kbuild test robot
@ 2017-04-06 16:26   ` Pablo Neira Ayuso
  1 sibling, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-06 16:26 UTC (permalink / raw)
  To: Arushi Singhal
  Cc: kadlec, davem, outreachy-kernel, netfilter-devel, coreteam,
	gregkh, netdev, linux-kernel

On Sat, Mar 25, 2017 at 05:57:55PM +0530, Arushi Singhal wrote:
> This patch removes typedefs from struct and renames it from "typedef struct
> field_t" to "struct field" as per kernel coding standards."
> 
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
>  net/netfilter/nf_conntrack_h323_asn1.c | 68 +++++++++++++++++-----------------
>  1 file changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/net/netfilter/nf_conntrack_h323_asn1.c b/net/netfilter/nf_conntrack_h323_asn1.c
> index 89b2e46925c4..fb8cf238a76f 100644
> --- a/net/netfilter/nf_conntrack_h323_asn1.c
> +++ b/net/netfilter/nf_conntrack_h323_asn1.c
> @@ -77,7 +77,7 @@
>  
>  
>  /* ASN.1 Field Structure */
> -typedef struct field_t {
> +struct field {

Probably better if you rename this to 'struct h323_field' to make sure
compilation doesn't break due to structure name pollution. And we also
got a report from kbuild robot that would be good to investigate.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-06 16:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-25 12:27 [PATCH 0/2] net: netfilters: Remove typedef Arushi Singhal
2017-03-25 12:27 ` [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t" Arushi Singhal
2017-03-27  1:25   ` kbuild test robot
2017-04-06 16:26   ` Pablo Neira Ayuso
2017-03-25 12:27 ` [PATCH 2/2] net: netfilter: Remove typedef from "typedef struct bitstr_t" Arushi Singhal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.