diff options
author | Reza Arbab <arbab@linux.ibm.com> | 2022-05-24 10:49:54 -0500 |
---|---|---|
committer | Reza Arbab <arbab@linux.ibm.com> | 2022-06-13 08:19:29 -0500 |
commit | ed48bb1015da33a3b34f76b97cbd943cde9812b1 (patch) | |
tree | f77199f321cf6cd13fbf8657cc6b59fbe679f0ab /hw/fsp | |
parent | 9c2808f237f7ef5f93054bef6a019402ec5a2b4b (diff) | |
download | skiboot-ed48bb1015da33a3b34f76b97cbd943cde9812b1.zip skiboot-ed48bb1015da33a3b34f76b97cbd943cde9812b1.tar.gz skiboot-ed48bb1015da33a3b34f76b97cbd943cde9812b1.tar.bz2 |
fsp: Fix possible use of null "%s" prlog argument
Caught by CI in fedora-rawhide (GCC 12):
hw/fsp/fsp-codeupdate.c:116:26: error: '%s' directive argument is null [-Werror=format-overflow=]
116 | prlog(PR_NOTICE, "CUPD: IPL SIDE = %s\n", side);
To prevent this, explicitly print the value of ipl_side instead.
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Reviewed-by: Dan HorĂ¡k <dan@danny.cz>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp-codeupdate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c index 3cd5b2b..1120545 100644 --- a/hw/fsp/fsp-codeupdate.c +++ b/hw/fsp/fsp-codeupdate.c @@ -113,12 +113,14 @@ static void get_ipl_side(void) iplp = dt_find_by_path(dt_root, "ipl-params/ipl-params"); if (iplp) side = dt_prop_get_def(iplp, "cec-ipl-side", NULL); - prlog(PR_NOTICE, "CUPD: IPL SIDE = %s\n", side); if (!side || !strcmp(side, "temp")) ipl_side = FW_IPL_SIDE_TEMP; else ipl_side = FW_IPL_SIDE_PERM; + + prlog(PR_NOTICE, "CUPD: IPL SIDE = %s\n", + ipl_side == FW_IPL_SIDE_TEMP ? "temp" : "perm"); } |