From 6f80ccc357702f87baf43440d97a49bcce999393 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Thu, 16 Mar 2017 15:18:22 -0700 Subject: arch/x86: Wrap lines at 80 columns Fix the following warning detected by checkpatch.pl: WARNING: line over 80 characters TEST=Build and run on Galileo Gen2 Change-Id: I3495cd30d1737d9ee728c8a9e72bd426d7a69c37 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/18864 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/x86/smbios.c | 72 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 24 deletions(-) (limited to 'src/arch/x86/smbios.c') diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 9276fc2d48..62443274dc 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -1,7 +1,8 @@ /* * This file is part of the coreboot project. * - * Copyright (C) 2015 Timothy Pearson , Raptor Engineering + * Copyright (C) 2015 Timothy Pearson , + * Raptor Engineering * Copyright (C) 2011 Sven Schnelle * * This program is free software; you can redistribute it and/or @@ -124,7 +125,8 @@ static int smbios_processor_name(char *start) } /* this function will fill the corresponding manufacturer */ -void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17 *t) +void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, + struct smbios_type17 *t) { switch (mod_id) { case 0x2c80: @@ -280,7 +282,8 @@ static int smbios_write_type0(unsigned long *current, int handle) #if !CONFIG_CHROMEOS t->bios_release_date = smbios_add_string(t->eos, coreboot_dmi_date); - t->bios_version = smbios_add_string(t->eos, smbios_mainboard_bios_version()); + t->bios_version = smbios_add_string(t->eos, + smbios_mainboard_bios_version()); #else #define SPACES \ " " @@ -371,9 +374,12 @@ static int smbios_write_type1(unsigned long *current, int handle) t->type = SMBIOS_SYSTEM_INFORMATION; t->handle = handle; t->length = len - 2; - t->manufacturer = smbios_add_string(t->eos, smbios_mainboard_manufacturer()); - t->product_name = smbios_add_string(t->eos, smbios_mainboard_product_name()); - t->serial_number = smbios_add_string(t->eos, smbios_mainboard_serial_number()); + t->manufacturer = smbios_add_string(t->eos, + smbios_mainboard_manufacturer()); + t->product_name = smbios_add_string(t->eos, + smbios_mainboard_product_name()); + t->serial_number = smbios_add_string(t->eos, + smbios_mainboard_serial_number()); t->sku = smbios_add_string(t->eos, smbios_mainboard_sku()); t->version = smbios_add_string(t->eos, smbios_mainboard_version()); #ifdef CONFIG_MAINBOARD_FAMILY @@ -394,9 +400,12 @@ static int smbios_write_type2(unsigned long *current, int handle) t->type = SMBIOS_BOARD_INFORMATION; t->handle = handle; t->length = len - 2; - t->manufacturer = smbios_add_string(t->eos, smbios_mainboard_manufacturer()); - t->product_name = smbios_add_string(t->eos, smbios_mainboard_product_name()); - t->serial_number = smbios_add_string(t->eos, smbios_mainboard_serial_number()); + t->manufacturer = smbios_add_string(t->eos, + smbios_mainboard_manufacturer()); + t->product_name = smbios_add_string(t->eos, + smbios_mainboard_product_name()); + t->serial_number = smbios_add_string(t->eos, + smbios_mainboard_serial_number()); t->version = smbios_add_string(t->eos, smbios_mainboard_version()); len = t->length + smbios_string_table_len(t->eos); *current += len; @@ -412,7 +421,8 @@ static int smbios_write_type3(unsigned long *current, int handle) t->type = SMBIOS_SYSTEM_ENCLOSURE; t->handle = handle; t->length = len - 2; - t->manufacturer = smbios_add_string(t->eos, smbios_mainboard_manufacturer()); + t->manufacturer = smbios_add_string(t->eos, + smbios_mainboard_manufacturer()); t->bootup_state = SMBIOS_STATE_SAFE; t->power_supply_state = SMBIOS_STATE_SAFE; t->thermal_state = SMBIOS_STATE_SAFE; @@ -500,7 +510,8 @@ static int smbios_write_type17(unsigned long *current, int *handle) return 0; /* can't find mem info in cbmem */ printk(BIOS_INFO, "Create SMBIOS type 17\n"); - for (i = 0; i < meminfo->dimm_cnt && i < ARRAY_SIZE(meminfo->dimm); i++) { + for (i = 0; i < meminfo->dimm_cnt && i < ARRAY_SIZE(meminfo->dimm); + i++) { struct dimm_info *dimm; dimm = &meminfo->dimm[i]; len = create_smbios_type17_for_dimm(dimm, current, handle); @@ -562,7 +573,8 @@ static int smbios_write_type127(unsigned long *current, int handle) return len; } -static int smbios_walk_device_tree(struct device *tree, int *handle, unsigned long *current) +static int smbios_walk_device_tree(struct device *tree, int *handle, + unsigned long *current) { struct device *dev; int len = 0; @@ -600,21 +612,32 @@ unsigned long smbios_write_tables(unsigned long current) current = ALIGN(current, 16); tables = current; - update_max(len, max_struct_size, smbios_write_type0(¤t, handle++)); - update_max(len, max_struct_size, smbios_write_type1(¤t, handle++)); - update_max(len, max_struct_size, smbios_write_type2(¤t, handle++)); - update_max(len, max_struct_size, smbios_write_type3(¤t, handle++)); - update_max(len, max_struct_size, smbios_write_type4(¤t, handle++)); - update_max(len, max_struct_size, smbios_write_type11(¤t, &handle)); + update_max(len, max_struct_size, smbios_write_type0(¤t, + handle++)); + update_max(len, max_struct_size, smbios_write_type1(¤t, + handle++)); + update_max(len, max_struct_size, smbios_write_type2(¤t, + handle++)); + update_max(len, max_struct_size, smbios_write_type3(¤t, + handle++)); + update_max(len, max_struct_size, smbios_write_type4(¤t, + handle++)); + update_max(len, max_struct_size, smbios_write_type11(¤t, + &handle)); #if CONFIG_ELOG - update_max(len, max_struct_size, elog_smbios_write_type15(¤t, handle++)); + update_max(len, max_struct_size, elog_smbios_write_type15(¤t, + handle++)); #endif - update_max(len, max_struct_size, smbios_write_type17(¤t, &handle)); - update_max(len, max_struct_size, smbios_write_type32(¤t, handle++)); + update_max(len, max_struct_size, smbios_write_type17(¤t, + &handle)); + update_max(len, max_struct_size, smbios_write_type32(¤t, + handle++)); - update_max(len, max_struct_size, smbios_walk_device_tree(all_devices, &handle, ¤t)); + update_max(len, max_struct_size, smbios_walk_device_tree(all_devices, + &handle, ¤t)); - update_max(len, max_struct_size, smbios_write_type127(¤t, handle++)); + update_max(len, max_struct_size, smbios_write_type127(¤t, + handle++)); memset(se, 0, sizeof(struct smbios_entry)); memcpy(se->anchor, "_SM_", 4); @@ -629,7 +652,8 @@ unsigned long smbios_write_tables(unsigned long current) se->struct_table_length = len; se->intermediate_checksum = smbios_checksum((u8 *)se + 0x10, - sizeof(struct smbios_entry) - 0x10); + sizeof(struct smbios_entry) + - 0x10); se->checksum = smbios_checksum((u8 *)se, sizeof(struct smbios_entry)); return current; } -- cgit v1.2.3