[U-Boot] [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));
Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com --- lib/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/smbios.c b/lib/smbios.c index df3d26b071..40c921984c 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -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); }

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);
Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com --- lib/smbios.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/smbios.c b/lib/smbios.c index 40c921984c..326eb00230 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -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; }

On 30 July 2018 at 05:22, Christian Gmeiner christian.gmeiner@gmail.com wrote:
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);
Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com
lib/smbios.c | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Mon, Jul 30, 2018 at 01:22:07PM +0200, Christian Gmeiner wrote:
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);
Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

On 30 July 2018 at 05:22, Christian Gmeiner christian.gmeiner@gmail.com wrote:
Fixes the following chechpatch -f error:
ERROR: "(foo*)" should be "(foo *)"
strncpy((char*)t->uuid, serial_str, sizeof(t->uuid));
Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com
lib/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Mon, Jul 30, 2018 at 01:22:06PM +0200, Christian Gmeiner wrote:
Fixes the following chechpatch -f error:
ERROR: "(foo*)" should be "(foo *)"
strncpy((char*)t->uuid, serial_str, sizeof(t->uuid));
Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (3)
-
Christian Gmeiner
-
Simon Glass
-
Tom Rini