src: Remove whitespace between 'sizeof' and '('
Change-Id: Iaf22dc1986427e8aa4521b0e9b40fafa5a29dbbd Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43720 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
89739baf53
commit
af56a77915
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue