From af56a7791565de4c3dec66b4cc6a8b152bba014c Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Wed, 22 Jul 2020 20:36:20 +0200 Subject: src: Remove whitespace between 'sizeof' and '(' Change-Id: Iaf22dc1986427e8aa4521b0e9b40fafa5a29dbbd Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/43720 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/device/oprom/x86emu/debug.c | 2 +- src/drivers/i2c/at24rf08c/lenovo_serials.c | 18 +++++++++--------- src/drivers/intel/fsp2_0/hand_off_block.c | 2 +- src/drivers/intel/gma/vbt.c | 22 +++++++++++----------- src/drivers/usb/ehci_debug.c | 2 +- src/ec/lenovo/h8/h8.c | 4 ++-- src/soc/intel/baytrail/southcluster.c | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/device/oprom/x86emu/debug.c b/src/device/oprom/x86emu/debug.c index 9e216e9df6..ab55198d23 100644 --- a/src/device/oprom/x86emu/debug.c +++ b/src/device/oprom/x86emu/debug.c @@ -170,7 +170,7 @@ void x86emu_decode_printf (const char *x) void x86emu_decode_printf2 (const char *x, int y) { char temp[100]; - snprintf(temp, sizeof (temp), x,y); + snprintf(temp, sizeof(temp), x,y); strcpy(M.x86.decoded_buf+M.x86.enc_str_pos,temp); M.x86.enc_str_pos += strlen(temp); } diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c index afadc6fd53..36e7ab2638 100644 --- a/src/drivers/i2c/at24rf08c/lenovo_serials.c +++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c @@ -45,7 +45,7 @@ static void at24rf08c_read_string_dev(struct device *dev, u8 start, int t = at24rf08c_read_byte(dev, start + i); if (t < 0x20 || t > 0x7f) { - memcpy(result, ERROR_STRING, sizeof (ERROR_STRING)); + memcpy(result, ERROR_STRING, sizeof(ERROR_STRING)); return; } result[i] = t; @@ -60,7 +60,7 @@ static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result) dev = at24rf08c_find_bank(bank); if (dev == NULL) { printk(BIOS_WARNING, "EEPROM not found\n"); - memcpy(result, ERROR_STRING, sizeof (ERROR_STRING)); + memcpy(result, ERROR_STRING, sizeof(ERROR_STRING)); return; } @@ -75,7 +75,7 @@ const char *smbios_mainboard_serial_number(void) if (already_read) return result; - memset(result, 0, sizeof (result)); + memset(result, 0, sizeof(result)); at24rf08c_read_string(0, 0x2e, 7, result); already_read = 1; @@ -90,7 +90,7 @@ const char *lenovo_mainboard_partnumber(void) if (already_read) return result; - memset(result, 0, sizeof (result)); + memset(result, 0, sizeof(result)); at24rf08c_read_string(0, 0x27, 7, result); already_read = 1; @@ -119,7 +119,7 @@ void smbios_system_set_uuid(u8 *uuid) return; } - memset(result, 0, sizeof (result)); + memset(result, 0, sizeof(result)); dev = dev_find_slot_on_smbus(1, 0x56); if (dev == NULL) { @@ -141,7 +141,7 @@ void smbios_system_set_uuid(u8 *uuid) break; } if (t < 0) { - memset(result, 0, sizeof (result)); + memset(result, 0, sizeof(result)); break; } result[remap[i]] = t; @@ -162,17 +162,17 @@ const char *smbios_mainboard_version(void) if (already_read) return result; - memset(result, 0, sizeof (result)); + memset(result, 0, sizeof(result)); dev = at24rf08c_find_bank(2); if (dev == NULL) { - memcpy(result, ERROR_STRING, sizeof (ERROR_STRING)); + memcpy(result, ERROR_STRING, sizeof(ERROR_STRING)); return result; } len = at24rf08c_read_byte(dev, 0x26) - 2; if (len < 0 || len > sizeof(result) - 1) { - memcpy(result, ERROR_STRING, sizeof (ERROR_STRING)); + memcpy(result, ERROR_STRING, sizeof(ERROR_STRING)); return result; } diff --git a/src/drivers/intel/fsp2_0/hand_off_block.c b/src/drivers/intel/fsp2_0/hand_off_block.c index fdc92a7cbf..44c91a2949 100644 --- a/src/drivers/intel/fsp2_0/hand_off_block.c +++ b/src/drivers/intel/fsp2_0/hand_off_block.c @@ -218,7 +218,7 @@ static void display_fsp_version_info_hob(const void *hob, size_t size) fvi = (void *)&fvih[1]; str_ptr = (char *)((uintptr_t)fvi + - (fvih->Count * sizeof (FIRMWARE_VERSION_INFO))); + (fvih->Count * sizeof(FIRMWARE_VERSION_INFO))); size -= sizeof(SMBIOS_STRUCTURE); for (index = 0; index < fvih->Count; index++) { diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c index f1ad265b9f..b42c52d02c 100644 --- a/src/drivers/intel/gma/vbt.c +++ b/src/drivers/intel/gma/vbt.c @@ -15,31 +15,31 @@ static size_t generate_vbt(const struct i915_gpu_controller_info *const conf, { u8 *ptr; - memset(head, 0, sizeof (*head)); + memset(head, 0, sizeof(*head)); - memset(head->signature, ' ', sizeof (head->signature)); + memset(head->signature, ' ', sizeof(head->signature)); memcpy(head->signature, idstr, - MIN(strlen(idstr), sizeof (head->signature))); + MIN(strlen(idstr), sizeof(head->signature))); head->version = 100; - head->header_size = sizeof (*head); - head->bdb_offset = sizeof (*head); + head->header_size = sizeof(*head); + head->bdb_offset = sizeof(*head); struct bdb_header *const bdb_head = (struct bdb_header *)(head + 1); - memset(bdb_head, 0, sizeof (*bdb_head)); + memset(bdb_head, 0, sizeof(*bdb_head)); memcpy(bdb_head->signature, "BIOS_DATA_BLOCK ", 16); bdb_head->version = 0xa8; - bdb_head->header_size = sizeof (*bdb_head); + bdb_head->header_size = sizeof(*bdb_head); ptr = (u8 *)(bdb_head + 1); ptr[0] = BDB_GENERAL_FEATURES; - ptr[1] = sizeof (struct bdb_general_features); - ptr[2] = sizeof (struct bdb_general_features) >> 8; + ptr[1] = sizeof(struct bdb_general_features); + ptr[2] = sizeof(struct bdb_general_features) >> 8; ptr += 3; struct bdb_general_features *const genfeat = (struct bdb_general_features *)ptr; - memset(genfeat, 0, sizeof (*genfeat)); + memset(genfeat, 0, sizeof(*genfeat)); genfeat->panel_fitting = 3; genfeat->flexaim = 1; genfeat->download_ext_vbt = 1; @@ -50,7 +50,7 @@ static size_t generate_vbt(const struct i915_gpu_controller_info *const conf, genfeat->int_crt_support = 1; genfeat->dp_ssc_enb = 1; - ptr += sizeof (*genfeat); + ptr += sizeof(*genfeat); bdb_head->bdb_size = ptr - (u8 *)bdb_head; head->vbt_size = ptr - (u8 *)head; diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c index 07d87ae6c5..5998172b87 100644 --- a/src/drivers/usb/ehci_debug.c +++ b/src/drivers/usb/ehci_debug.c @@ -436,7 +436,7 @@ static int usbdebug_init_(uintptr_t ehci_bar, unsigned int offset, struct ehci_d int playtimes = 3; /* Keep all endpoints disabled before any printk() call. */ - memset(info, 0, sizeof (*info)); + memset(info, 0, sizeof(*info)); info->ehci_base = ehci_bar; info->ehci_debug = ehci_bar + offset; info->ep_pipe[0].status |= DBGP_EP_NOT_PRESENT; diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index aa1877eac6..093a639ed5 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -172,14 +172,14 @@ u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len) for (i = 0; i < 8; i++) { c = ec_read(0xf0 + i); if (c < 0x20 || c > 0x7f) { - i = snprintf(str, sizeof (str), "*INVALID"); + i = snprintf(str, sizeof(str), "*INVALID"); break; } str[i] = c; } /* EC firmware function specification version */ - i += snprintf(str + i, sizeof (str) - i, "-%u.%u", ec_read(0xef), ec_read(0xeb)); + i += snprintf(str + i, sizeof(str) - i, "-%u.%u", ec_read(0xef), ec_read(0xeb)); i = MIN(buf_len, i); memcpy(buf, str, i); diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c index 45c588a165..882c43d9a7 100644 --- a/src/soc/intel/baytrail/southcluster.c +++ b/src/soc/intel/baytrail/southcluster.c @@ -490,7 +490,7 @@ static void southcluster_inject_dsdt(const struct device *device) gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); if (!gnvs) { - gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof (*gnvs)); + gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs)); if (gnvs) memset(gnvs, 0, sizeof(*gnvs)); } -- cgit v1.2.3