Skip to contentSkip to conversation

smbios: fix checkstyle error

PATCH New Christian Gmeiner 3 participants 6 messages Jul 30, 2018 – Aug 11, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 smbios: fix checkstyle error

Fixes the following chechpatch -f error:

ERROR: "(foo*)" should be "(foo *)"
+ strncpy((char*)t->uuid, serial_str, sizeof(t->uuid));

---
 lib/smbios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/smbios.c +1 -1
index df3d26b071..40c921984c 100644
@@ -116,7 +116,7 @@ static int smbios_write_type1(ulong *current, int handle)
 	t->manufacturer = smbios_add_string(t->eos, CONFIG_SMBIOS_MANUFACTURER);
 	t->product_name = smbios_add_string(t->eos, CONFIG_SMBIOS_PRODUCT_NAME);
 	if (serial_str) {
-		strncpy((char*)t->uuid, serial_str, sizeof(t->uuid));
+		strncpy((char *)t->uuid, serial_str, sizeof(t->uuid));
 		t->serial_number = smbios_add_string(t->eos, serial_str);
 	}
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 smbios: fix checkstyle warning

Fixes the following checkstyle warning:

WARNING: Missing a blank line after declarations
+ int tmp = smbios_write_funcs[i]((ulong *)&addr, handle++);
+ max_struct_size = max(max_struct_size, tmp);

---
 lib/smbios.c | 1 +
 1 file changed, 1 insertion(+)
lib/smbios.c +1 -0
index 40c921984c..326eb00230 100644
@@ -278,6 +278,7 @@ ulong write_smbios_table(ulong addr)
 	/* populate minimum required tables */
 	for (i = 0; i < ARRAY_SIZE(smbios_write_funcs); i++) {
 		int tmp = smbios_write_funcs[i]((ulong *)&addr, handle++);
+
 		max_struct_size = max(max_struct_size, tmp);
 		len += tmp;
 	}
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 smbios: fix checkstyle warning

Quoted 10 lines · Christian Gmeiner

Fixes the following checkstyle warning:

WARNING: Missing a blank line after declarations

(quoted diff) +2 -0
+               int tmp = smbios_write_funcs[i]((ulong *)&addr, handle++);
+               max_struct_size = max(max_struct_size, tmp);
---
 lib/smbios.c | 1 +
 1 file changed, 1 insertion(+)
#3 lore raw

PATCH 2/2 smbios: fix checkstyle warning

In reply to Christian Gmeiner
Quoted 8 lines · Christian Gmeiner

Fixes the following checkstyle warning:

WARNING: Missing a blank line after declarations

(quoted diff) +2 -0
+               int tmp = smbios_write_funcs[i]((ulong *)&addr, handle++);
+               max_struct_size = max(max_struct_size, tmp);

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/5b70be85/attachment.sig>
#5 lore raw

PATCH 1/2 smbios: fix checkstyle error

In reply to Christian Gmeiner
Quoted 7 lines · Christian Gmeiner

Fixes the following chechpatch -f error:

ERROR: "(foo*)" should be "(foo *)"
+ strncpy((char*)t->uuid, serial_str, sizeof(t->uuid));

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/782b2433/attachment.sig>