Skip to content

Commit

Permalink
i.MX6ul: Fix bad printf format specifiers
Browse files Browse the repository at this point in the history
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Message-id: 20201126111109.112238-5-alex.chen@huawei.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
Alex Chen authored and pm215 committed Dec 10, 2020
1 parent 9197c7b commit 6c4e50b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/misc/imx6ul_ccm.c
Expand Up @@ -143,7 +143,7 @@ static const char *imx6ul_ccm_reg_name(uint32_t reg)
case CCM_CMEOR:
return "CMEOR";
default:
sprintf(unknown, "%d ?", reg);
sprintf(unknown, "%u ?", reg);
return unknown;
}
}
Expand Down Expand Up @@ -274,7 +274,7 @@ static const char *imx6ul_analog_reg_name(uint32_t reg)
case USB_ANALOG_DIGPROG:
return "USB_ANALOG_DIGPROG";
default:
sprintf(unknown, "%d ?", reg);
sprintf(unknown, "%u ?", reg);
return unknown;
}
}
Expand Down

0 comments on commit 6c4e50b

Please sign in to comment.