Subject: Re: [PATCH iproute2 v4 1/2] tc: u32: add support for json output

From: Stephen Hemminger <[email-masked]>
Date: Mon, 17 Jan 2022 20:30:44 -0800

On Mon, 17 Jan 2022 21:42:20 -0500
Wen Liang <[email-masked]> wrote:

> Currently u32 filter output does not support json. This commit uses
> proper json functions to add support for it.
> 
> Signed-off-by: Wen Liang <[email-masked]>

Minor warnings from checkpatch, please fix:

WARNING: Missing a blank line after declarations
#88: FILE: tc/f_u32.c:1231:
+		__u32 htdivisor = rta_getattr_u32(tb[TCA_U32_DIVISOR]);
+		print_int(PRINT_ANY, "ht_divisor", "ht divisor %d ", htdivisor);

ERROR: space required after that ',' (ctx:VxV)
#114: FILE: tc/f_u32.c:1250:
+		char *link = sprint_u32_handle(rta_getattr_u32(tb[TCA_U32_LINK]),b1);
 		                                                                ^

WARNING: Missing a blank line after declarations
#115: FILE: tc/f_u32.c:1251:
+		char *link = sprint_u32_handle(rta_getattr_u32(tb[TCA_U32_LINK]),b1);
+		print_string(PRINT_ANY, "link", "link %s ", link);

WARNING: Missing a blank line after declarations
#202: FILE: tc/f_u32.c:1323:
+			unsigned int hmask = (unsigned int)htonl(sel->hmask);
+			print_hex(PRINT_ANY, "hash_mask", "    hash mask %08x ", hmask);

total: 1 errors, 3 warnings, 151 lines checked