Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang warnings #18

Open
wants to merge 4 commits into
base: atf-v1.5-armada-18.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ble/ble.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ BLE_LINKERFILE := $(BLE_PATH)/ble.ld.S
FORCE:

$(MV_DDR_LIB): FORCE
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(PLAT_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(CURDIR)/$(BUILD_PLAT)/ble
@+$(MAKE) -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(PLAT_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(CURDIR)/$(BUILD_PLAT)/ble
3 changes: 3 additions & 0 deletions drivers/marvell/comphy/phy-comphy-cp110.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ enum pcie_link_width {
PCIE_LNK_WIDTH_UNKNOWN = 0xFF,
};

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-braces"
_Bool rx_trainng_done[AP_NUM][CP_NUM][MAX_LANE_NR] = {0};
#pragma clang diagnostic pop

static void mvebu_cp110_get_ap_and_cp_nr(uint8_t *ap_nr, uint8_t *cp_nr, uint64_t comphy_base)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/marvell/i2c/a8k_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int marvell_i2c_interrupt_get(void)
/* get the interrupt flag bit */
reg = mmio_read_32((uintptr_t)&base->control);
reg &= I2C_CONTROL_IFLG;
return reg && I2C_CONTROL_IFLG;
return reg & I2C_CONTROL_IFLG;
}

static int marvell_i2c_wait_interrupt(void)
Expand Down
1 change: 1 addition & 0 deletions lib/locks/bakery/bakery_lock_normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ IMPORT_SYM(uintptr_t, __PERCPU_BAKERY_LOCK_SIZE__, PERCPU_BAKERY_LOCK_SIZE);
dccivac((uintptr_t)addr)

/* Helper function to check if the lock is acquired */
__attribute__((unused))
static inline int is_lock_acquired(const bakery_info_t *my_bakery_info,
int is_cached)
{
Expand Down
2 changes: 2 additions & 0 deletions plat/common/plat_bl_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#pragma weak bl2_el3_plat_prepare_exit
#pragma weak plat_error_handler
#pragma weak bl2_plat_preload_setup
#if LOAD_IMAGE_V2
#pragma weak bl2_plat_handle_pre_image_load
#pragma weak bl2_plat_handle_post_image_load
#endif
#pragma weak plat_try_next_boot_source

void bl2_el3_plat_prepare_exit(void)
Expand Down
3 changes: 3 additions & 0 deletions plat/marvell/a8k/common/plat_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ __dead2 a8k_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state)
* At this stage any access to DRAM (procedure call) will
* release it from the self-refresh mode
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wasm-operand-widths"
__asm__ volatile (
/* Align to a cache line */
" .balign 64\n\t"
Expand All @@ -784,6 +786,7 @@ __dead2 a8k_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state)
: : [srcmd] "r" (srcmd), [sdram_reg] "r" (sdram_reg),
[gpio_addr] "r" (gpio_addr), [gpio_data] "r" (gpio_data)
: "x1");
#pragma clang diagnostic pop

panic();
}
Expand Down
2 changes: 2 additions & 0 deletions plat/marvell/common/marvell_bl2_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ static bl2_to_bl31_params_mem_t bl31_params_mem;
#pragma weak bl2_plat_flush_bl31_params
#pragma weak bl2_plat_set_bl31_ep_info
#pragma weak bl2_plat_get_scp_bl2_meminfo
#ifdef BL32_BASE
#pragma weak bl2_plat_get_bl32_meminfo
#endif
#pragma weak bl2_plat_set_bl32_ep_info
#pragma weak bl2_plat_get_bl33_meminfo
#pragma weak bl2_plat_set_bl33_ep_info
Expand Down