arm: stm32mp: migrate cmd_stm32prog to log macro

Change debug and pr_ macro to log macro.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
Patrick Delaunay 2020-11-06 19:01:30 +01:00 committed by Patrick Delaunay
parent eb653acd63
commit 711b5bc0a2
5 changed files with 78 additions and 78 deletions

View file

@ -47,11 +47,11 @@ static int stm32prog_cmd_write(u64 offset, void *buf, long *len)
int ret;
if (*len < 5) {
pr_err("size not allowed\n");
log_err("size not allowed\n");
return -EINVAL;
}
if (offset) {
pr_err("invalid offset\n");
log_err("invalid offset\n");
return -EINVAL;
}
phase = pt[0];
@ -66,7 +66,7 @@ static int stm32prog_cmd_write(u64 offset, void *buf, long *len)
/* set phase and offset */
ret = stm32prog_set_phase(stm32prog_data, phase, address);
if (ret)
pr_err("failed: %d\n", ret);
log_err("failed: %d\n", ret);
return ret;
}
@ -81,7 +81,7 @@ static int stm32prog_cmd_read(u64 offset, void *buf, long *len)
int length;
if (*len < PHASE_MIN_SIZE) {
pr_err("request exceeds allowed area\n");
log_err("request exceeds allowed area\n");
return -EINVAL;
}
if (offset) {
@ -171,8 +171,8 @@ int stm32prog_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
{
if (dfu->dev_type != DFU_DEV_VIRT) {
*size = 0;
pr_debug("%s, invalid dev_type = %d\n",
__func__, dfu->dev_type);
log_debug("%s, invalid dev_type = %d\n",
__func__, dfu->dev_type);
return -EINVAL;
}
@ -227,6 +227,6 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
int g_dnl_get_board_bcd_device_number(int gcnum)
{
pr_debug("%s\n", __func__);
log_debug("%s\n", __func__);
return 0x200;
}