summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-11-18 15:05:39 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-11-22 13:40:56 +0000
commit1ef547eec7262f96770f1fe4d1c6ff44b624dbe2 (patch)
tree208ee987a82a1a5db011fccab7e6a9ed9ef8cdb4
parent385939f7cfeeb732c4a54f6069940c2a7de53579 (diff)
src/drivers: Remove unnecessary space after casts
Change-Id: I16689da893b5a0c3254364759d435281cb3e1caf Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69803 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/drivers/amd/agesa/heapmanager.c4
-rw-r--r--src/drivers/aspeed/common/ast_post.c4
-rw-r--r--src/drivers/i2c/ptn3460/ptn3460.c4
-rw-r--r--src/drivers/i2c/tpm/tis.c4
-rw-r--r--src/drivers/intel/fsp2_0/hand_off_block.c4
-rw-r--r--src/drivers/intel/fsp2_0/silicon_init.c6
-rw-r--r--src/drivers/ipmi/ipmi_fru.c4
-rw-r--r--src/drivers/ipmi/ipmi_ops.c18
-rw-r--r--src/drivers/ipmi/ocp/ipmi_ocp.c4
-rw-r--r--src/drivers/ipmi/ocp/ipmi_ocp_romstage.c8
-rw-r--r--src/drivers/ipmi/supermicro_oem.c8
-rw-r--r--src/drivers/net/ne2k.c2
-rw-r--r--src/drivers/pc80/vga/vga.c4
-rw-r--r--src/drivers/pc80/vga/vga_io.c16
14 files changed, 45 insertions, 45 deletions
diff --git a/src/drivers/amd/agesa/heapmanager.c b/src/drivers/amd/agesa/heapmanager.c
index 26947f1857..8a82efedba 100644
--- a/src/drivers/amd/agesa/heapmanager.c
+++ b/src/drivers/amd/agesa/heapmanager.c
@@ -42,7 +42,7 @@ void EmptyHeap(void)
memset(base, 0, BIOS_HEAP_SIZE);
printk(BIOS_DEBUG, "Wiped HEAP at [%08x - %08x]\n",
- (unsigned int)(uintptr_t)base, (unsigned int)(uintptr_t) base + BIOS_HEAP_SIZE - 1);
+ (unsigned int)(uintptr_t)base, (unsigned int)(uintptr_t)base + BIOS_HEAP_SIZE - 1);
}
#if defined(HEAP_CALLOUT_RUNTIME) && ENV_RAMSTAGE
@@ -345,7 +345,7 @@ static AGESA_STATUS agesa_LocateBuffer(BIOS_HEAP_MANAGER *BiosHeapBasePtr,
}
}
- AllocParams->BufferPointer = (UINT8 *)((UINT8 *) AllocNodePtr + sizeof(BIOS_BUFFER_NODE));
+ AllocParams->BufferPointer = (UINT8 *)((UINT8 *)AllocNodePtr + sizeof(BIOS_BUFFER_NODE));
AllocParams->BufferLength = AllocNodePtr->BufferSize;
return AGESA_SUCCESS;
diff --git a/src/drivers/aspeed/common/ast_post.c b/src/drivers/aspeed/common/ast_post.c
index 08bc42c833..856e4e5ac6 100644
--- a/src/drivers/aspeed/common/ast_post.c
+++ b/src/drivers/aspeed/common/ast_post.c
@@ -740,9 +740,9 @@ static void finetuneDQSI(struct ast_private *ast)
passcnt[dqsip]++;
tag[dqsip][dlli] = 'P';
if (dlli < pass[dqidly][dqsip][0])
- pass[dqidly][dqsip][0] = (u16) dlli;
+ pass[dqidly][dqsip][0] = (u16)dlli;
if (dlli > pass[dqidly][dqsip][1])
- pass[dqidly][dqsip][1] = (u16) dlli;
+ pass[dqidly][dqsip][1] = (u16)dlli;
} else if (passcnt[dqsip] >= 5)
break;
else {
diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c
index 25ed98a4be..46719dc5e6 100644
--- a/src/drivers/i2c/ptn3460/ptn3460.c
+++ b/src/drivers/i2c/ptn3460/ptn3460.c
@@ -63,7 +63,7 @@ static int ptn3460_write_edid(struct device *dev, u8 edid_num, u8 *data)
static void ptn3460_init(struct device *dev)
{
struct ptn_3460_config cfg;
- uint8_t edid_data[PTN_EDID_LEN], edid_tab, *ptr = (uint8_t *) &cfg;
+ uint8_t edid_data[PTN_EDID_LEN], edid_tab, *ptr = (uint8_t *)&cfg;
int i, val;
/* Guard against re-initialization of the device */
@@ -108,7 +108,7 @@ static void ptn3460_init(struct device *dev)
/* Mainboard can modify the configuration data.
Write back configuration data to PTN3460 if modified by mainboard */
if (mb_adjust_cfg(&cfg) == PTN_CFG_MODIFIED) {
- ptr = (uint8_t *) &cfg;
+ ptr = (uint8_t *)&cfg;
for (i = 0; i < sizeof(struct ptn_3460_config); i++) {
val = i2c_dev_writeb_at(dev, PTN_CONFIG_OFF + i, *ptr++);
if (val < 0) {
diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c
index 80de2df994..ea8cf3de70 100644
--- a/src/drivers/i2c/tpm/tis.c
+++ b/src/drivers/i2c/tpm/tis.c
@@ -78,7 +78,7 @@ static ssize_t tpm_transmit(const uint8_t *sbuf, size_t sbufsiz, void *rbuf,
}
ASSERT(chip.vendor.send);
- rc = chip.vendor.send(&chip, (uint8_t *) sbuf, count);
+ rc = chip.vendor.send(&chip, (uint8_t *)sbuf, count);
if (rc < 0) {
printk(BIOS_DEBUG, "%s: tpm_send error\n", __func__);
goto out;
@@ -111,7 +111,7 @@ static ssize_t tpm_transmit(const uint8_t *sbuf, size_t sbufsiz, void *rbuf,
out_recv:
- rc = chip.vendor.recv(&chip, (uint8_t *) rbuf, rbufsiz);
+ rc = chip.vendor.recv(&chip, (uint8_t *)rbuf, rbufsiz);
if (rc < 0)
printk(BIOS_DEBUG, "%s: tpm_recv: error %d\n", __func__, rc);
out:
diff --git a/src/drivers/intel/fsp2_0/hand_off_block.c b/src/drivers/intel/fsp2_0/hand_off_block.c
index f0f580b813..aae1ff8fad 100644
--- a/src/drivers/intel/fsp2_0/hand_off_block.c
+++ b/src/drivers/intel/fsp2_0/hand_off_block.c
@@ -261,14 +261,14 @@ static void display_fsp_version_info_hob(const void *hob)
tcount = fvih->Count;
#elif CONFIG(DISPLAY_FSP_VERSION_INFO_2)
- uint8_t *hobstart = (uint8_t *) hob;
+ uint8_t *hobstart = (uint8_t *)hob;
hobstart += sizeof(EFI_HOB_GUID_TYPE);
const SMBIOS_TABLE_TYPE_OEM_INTEL_FVI *stfvi =
(SMBIOS_TABLE_TYPE_OEM_INTEL_FVI *)hobstart;
const INTEL_FIRMWARE_VERSION_INFO *fvi;
- str_ptr = ((char *) &(stfvi->Fvi[0])) +
+ str_ptr = ((char *)&(stfvi->Fvi[0])) +
(stfvi->Count * sizeof(INTEL_FIRMWARE_VERSION_INFO));
tcount = stfvi->Count;
fvi = &stfvi->Fvi[0];
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index 87f77a2be6..678892ac5c 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -96,7 +96,7 @@ static void do_silicon_init(struct fsp_header *hdr)
struct fsp_multi_phase_params multi_phase_params;
struct fsp_multi_phase_get_number_of_phases_params multi_phase_get_number;
- supd = (FSPS_UPD *) (uintptr_t)(hdr->cfg_region_offset + hdr->image_base);
+ supd = (FSPS_UPD *)(uintptr_t)(hdr->cfg_region_offset + hdr->image_base);
fsp_verify_upd_header_signature(supd->FspUpdHeader.Signature, FSPS_UPD_SIGNATURE);
@@ -127,7 +127,7 @@ static void do_silicon_init(struct fsp_header *hdr)
soc_load_logo(upd);
/* Call SiliconInit */
- silicon_init = (void *) (uintptr_t)(hdr->image_base +
+ silicon_init = (void *)(uintptr_t)(hdr->image_base +
hdr->fsp_silicon_init_entry_offset);
fsp_debug_before_silicon_init(silicon_init, supd, upd);
@@ -165,7 +165,7 @@ static void do_silicon_init(struct fsp_header *hdr)
return;
/* Call MultiPhaseSiInit */
- multi_phase_si_init = (void *) (uintptr_t)(hdr->image_base +
+ multi_phase_si_init = (void *)(uintptr_t)(hdr->image_base +
hdr->fsp_multi_phase_si_init_entry_offset);
/* Implementing multi_phase_si_init() is optional as per FSP 2.2 spec */
diff --git a/src/drivers/ipmi/ipmi_fru.c b/src/drivers/ipmi/ipmi_fru.c
index f16530705f..844eb8e8a3 100644
--- a/src/drivers/ipmi/ipmi_fru.c
+++ b/src/drivers/ipmi/ipmi_fru.c
@@ -36,8 +36,8 @@ static enum cb_err ipmi_read_fru(const int port, struct ipmi_read_fru_data_req *
while (retry_count <= MAX_FRU_BUSY_RETRY) {
ret = ipmi_message(port, IPMI_NETFN_STORAGE, 0x0,
- IPMI_READ_FRU_DATA, (const unsigned char *) req,
- sizeof(*req), (unsigned char *) &rsp, sizeof(rsp));
+ IPMI_READ_FRU_DATA, (const unsigned char *)req,
+ sizeof(*req), (unsigned char *)&rsp, sizeof(rsp));
if (rsp.resp.completion_code == 0x81) {
/* Device is busy */
if (retry_count == MAX_FRU_BUSY_RETRY) {
diff --git a/src/drivers/ipmi/ipmi_ops.c b/src/drivers/ipmi/ipmi_ops.c
index d9b3256eec..18547c5530 100644
--- a/src/drivers/ipmi/ipmi_ops.c
+++ b/src/drivers/ipmi/ipmi_ops.c
@@ -21,8 +21,8 @@ enum cb_err ipmi_init_and_start_bmc_wdt(const int port, uint16_t countdown,
req.initial_countdown_val = countdown;
ret = ipmi_message(port, IPMI_NETFN_APPLICATION, 0x0,
IPMI_BMC_SET_WDG_TIMER,
- (const unsigned char *) &req, sizeof(req),
- (unsigned char *) &rsp, sizeof(rsp));
+ (const unsigned char *)&req, sizeof(req),
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.completion_code) {
printk(BIOS_ERR, "IPMI: %s set wdt command failed "
@@ -35,7 +35,7 @@ enum cb_err ipmi_init_and_start_bmc_wdt(const int port, uint16_t countdown,
/* Reset command to start timer */
ret = ipmi_message(port, IPMI_NETFN_APPLICATION, 0x0,
IPMI_BMC_RESET_WDG_TIMER, NULL, 0,
- (unsigned char *) &rsp, sizeof(rsp));
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.completion_code) {
printk(BIOS_ERR, "IPMI: %s reset wdt command failed "
@@ -59,7 +59,7 @@ enum cb_err ipmi_stop_bmc_wdt(const int port)
/* Get current timer first */
ret = ipmi_message(port, IPMI_NETFN_APPLICATION, 0x0,
IPMI_BMC_GET_WDG_TIMER, NULL, 0,
- (unsigned char *) &rsp, sizeof(rsp));
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.resp.completion_code) {
printk(BIOS_ERR, "IPMI: %s get wdt command failed "
@@ -79,8 +79,8 @@ enum cb_err ipmi_stop_bmc_wdt(const int port)
req = rsp.data;
ret = ipmi_message(port, IPMI_NETFN_APPLICATION, 0x0,
IPMI_BMC_SET_WDG_TIMER,
- (const unsigned char *) &req, sizeof(req),
- (unsigned char *) &resp, sizeof(resp));
+ (const unsigned char *)&req, sizeof(req),
+ (unsigned char *)&resp, sizeof(resp));
if (ret < sizeof(struct ipmi_rsp) || resp.completion_code) {
printk(BIOS_ERR, "IPMI: %s set wdt command stop timer failed "
@@ -107,7 +107,7 @@ enum cb_err ipmi_get_system_guid(const int port, uint8_t *uuid)
ret = ipmi_message(port, IPMI_NETFN_APPLICATION, 0x0,
IPMI_BMC_GET_SYSTEM_GUID, NULL, 0,
- (unsigned char *) &rsp, sizeof(rsp));
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.resp.completion_code) {
printk(BIOS_ERR, "IPMI: %s command failed (ret=%d resp=0x%x)\n",
@@ -130,8 +130,8 @@ enum cb_err ipmi_add_sel(const int port, struct sel_event_record *sel)
}
ret = ipmi_message(port, IPMI_NETFN_STORAGE, 0x0,
- IPMI_ADD_SEL_ENTRY, (const unsigned char *) sel,
- 16, (unsigned char *) &rsp, sizeof(rsp));
+ IPMI_ADD_SEL_ENTRY, (const unsigned char *)sel,
+ 16, (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.resp.completion_code) {
printk(BIOS_ERR, "IPMI: %s command failed (ret=%d resp=0x%x)\n",
diff --git a/src/drivers/ipmi/ocp/ipmi_ocp.c b/src/drivers/ipmi/ocp/ipmi_ocp.c
index 9f583be934..e75edca659 100644
--- a/src/drivers/ipmi/ocp/ipmi_ocp.c
+++ b/src/drivers/ipmi/ocp/ipmi_ocp.c
@@ -29,8 +29,8 @@ static enum cb_err ipmi_set_ppin(struct device *dev)
req.cpu1_hi = xeon_sp_ppin[1].hi;
}
ret = ipmi_message(dev->path.pnp.port, IPMI_NETFN_OEM, 0x0, IPMI_OEM_SET_PPIN,
- (const unsigned char *) &req, sizeof(req),
- (unsigned char *) &rsp, sizeof(rsp));
+ (const unsigned char *)&req, sizeof(req),
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.completion_code) {
printk(BIOS_ERR, "IPMI: %s command failed (ret=%d resp=0x%x)\n",
diff --git a/src/drivers/ipmi/ocp/ipmi_ocp_romstage.c b/src/drivers/ipmi/ocp/ipmi_ocp_romstage.c
index 7b0b9ea036..8ef379eef2 100644
--- a/src/drivers/ipmi/ocp/ipmi_ocp_romstage.c
+++ b/src/drivers/ipmi/ocp/ipmi_ocp_romstage.c
@@ -11,7 +11,7 @@ enum cb_err ipmi_set_post_start(const int port)
struct ipmi_rsp rsp;
ret = ipmi_message(port, IPMI_NETFN_OEM, 0x0,
- IPMI_BMC_SET_POST_START, NULL, 0, (u8 *) &rsp,
+ IPMI_BMC_SET_POST_START, NULL, 0, (u8 *)&rsp,
sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.completion_code) {
@@ -45,7 +45,7 @@ enum cb_err ipmi_set_cmos_clear(void)
ret = ipmi_message(CONFIG_BMC_KCS_BASE, IPMI_NETFN_OEM, 0x0,
IPMI_OEM_GET_BIOS_BOOT_ORDER,
NULL, 0,
- (unsigned char *) &rsp, sizeof(rsp));
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.resp.completion_code) {
printk(BIOS_ERR, "IPMI: %s command failed (read ret=%d resp=0x%x)\n",
@@ -58,8 +58,8 @@ enum cb_err ipmi_set_cmos_clear(void)
SET_CMOS_AND_VALID_BIT(req.boot_mode);
ret = ipmi_message(CONFIG_BMC_KCS_BASE, IPMI_NETFN_OEM, 0x0,
IPMI_OEM_SET_BIOS_BOOT_ORDER,
- (const unsigned char *) &req, sizeof(req),
- (unsigned char *) &rsp, sizeof(rsp));
+ (const unsigned char *)&req, sizeof(req),
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(struct ipmi_rsp) || rsp.resp.completion_code) {
printk(BIOS_ERR, "IPMI: %s command failed (sent ret=%d resp=0x%x)\n",
diff --git a/src/drivers/ipmi/supermicro_oem.c b/src/drivers/ipmi/supermicro_oem.c
index 7af4e3b8a4..c63da5f020 100644
--- a/src/drivers/ipmi/supermicro_oem.c
+++ b/src/drivers/ipmi/supermicro_oem.c
@@ -36,8 +36,8 @@ static void set_coreboot_ver(const uint16_t kcs_port)
bios_ver.ver = IPMI_LUN0_AC_SET_BIOS_VER;
ret = ipmi_message(kcs_port, IPMI_NETFN_OEM, 0, IPMI_LUN0_SET_BIOS_STRING,
- (const unsigned char *) &bios_ver, sizeof(bios_ver),
- (unsigned char *) &rsp, sizeof(rsp));
+ (const unsigned char *)&bios_ver, sizeof(bios_ver),
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(rsp) || rsp.completion_code) {
printk(BIOS_ERR, "BMC_IPMI: %s command failed (ret=%d resp=0x%x)\n",
__func__, ret, rsp.completion_code);
@@ -55,8 +55,8 @@ static void set_coreboot_date(const uint16_t kcs_port)
bios_ver.ver = IPMI_LUN0_AC_SET_BIOS_DATE;
ret = ipmi_message(kcs_port, IPMI_NETFN_OEM, 0, IPMI_LUN0_SET_BIOS_STRING,
- (const unsigned char *) &bios_ver, sizeof(bios_ver),
- (unsigned char *) &rsp, sizeof(rsp));
+ (const unsigned char *)&bios_ver, sizeof(bios_ver),
+ (unsigned char *)&rsp, sizeof(rsp));
if (ret < sizeof(rsp) || rsp.completion_code) {
printk(BIOS_ERR, "BMC_IPMI: %s command failed (ret=%d resp=0x%x)\n",
__func__, ret, rsp.completion_code);
diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c
index 235c90966e..e0dc58b440 100644
--- a/src/drivers/net/ne2k.c
+++ b/src/drivers/net/ne2k.c
@@ -281,7 +281,7 @@ int ne2k_init(unsigned int eth_nic_base)
c = inb(eth_nic_base + NE_ASIC_OFFSET + NE_RESET);
outb(c, eth_nic_base + NE_ASIC_OFFSET + NE_RESET);
- (void) inb(0x84);
+ (void)inb(0x84);
outb(D8390_COMMAND_STP | D8390_COMMAND_RD2, eth_nic_base + D8390_P0_COMMAND);
outb(D8390_RCR_MON, eth_nic_base + D8390_P0_RCR);
diff --git a/src/drivers/pc80/vga/vga.c b/src/drivers/pc80/vga/vga.c
index dde03558d9..d970fea6b1 100644
--- a/src/drivers/pc80/vga/vga.c
+++ b/src/drivers/pc80/vga/vga.c
@@ -186,7 +186,7 @@ vga_font_8x16_load(void)
/* plane 2 */
vga_sr_write(0x02, 0x04);
- p = (unsigned char *) VGA_FB;
+ p = (unsigned char *)VGA_FB;
for (i = 0; i < count; i++) {
for (j = 0; j < 32; j++) {
if (j < height)
@@ -262,7 +262,7 @@ vga_frame_set(unsigned int line, unsigned int character)
void
vga_line_write(unsigned int line, const char *string)
{
- unsigned short *p = (unsigned short *) VGA_FB + (80 * line);
+ unsigned short *p = (unsigned short *)VGA_FB + (80 * line);
int i, len = strlen(string);
for (i = 0; i < 80; i++) {
diff --git a/src/drivers/pc80/vga/vga_io.c b/src/drivers/pc80/vga/vga_io.c
index e4b1eb902f..2bf2af4fcc 100644
--- a/src/drivers/pc80/vga/vga_io.c
+++ b/src/drivers/pc80/vga/vga_io.c
@@ -147,10 +147,10 @@ vga_ar_read(unsigned char index)
{
unsigned char ret;
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
outb(index, VGA_AR_INDEX);
ret = inb(VGA_AR_VALUE_READ);
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
return ret;
}
@@ -158,10 +158,10 @@ vga_ar_read(unsigned char index)
void
vga_ar_write(unsigned char index, unsigned char value)
{
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
outb(index, VGA_AR_INDEX);
outb(value, VGA_AR_VALUE_WRITE);
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
}
void
@@ -209,17 +209,17 @@ vga_gr_mask(unsigned char index, unsigned char value, unsigned char mask)
void
vga_palette_enable(void)
{
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
outb(0x00, VGA_AR_INDEX);
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
}
void
vga_palette_disable(void)
{
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
outb(0x20, VGA_AR_INDEX);
- (void) inb(VGA_STAT1);
+ (void)inb(VGA_STAT1);
}
unsigned char