From patchwork Tue May 24 15:49:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Reza Arbab X-Patchwork-Id: 1635090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=BE6s15rg; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L6zDZ18nlz9sGJ for ; Wed, 25 May 2022 01:50:21 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4L6zDW6Hf8z3bf9 for ; Wed, 25 May 2022 01:50:19 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=BE6s15rg; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=arbab@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=BE6s15rg; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4L6zDP0BQwz3bk9 for ; Wed, 25 May 2022 01:50:12 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24OFIJp4030737 for ; Tue, 24 May 2022 15:50:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=XXwbQAXGEXCzYxHnwwtvqawEQYK/tWAB7fcO4347vGs=; b=BE6s15rgbI2j8iv6MoR/Cm+vn+AQlgqF1Bu2IUDCSBlYwFfqCPsQ9hKYo51AFFFeAWdA nKxzeaBQHFZafQVwFKb8x7fEaMKAGZZGIY4MCqhqkxo+xwWhE1LZYp2vrPCgYCU8U9ym rwTiwDj0vW1ht2bl7iItAsGIZpNOkEl2+4M2HcLO83ZNbW5jVtLFtTcxuZlZAD4lo1Li CVOfk3AsqrafgdUwwF0CD6tUujBITWLH5DHPqNcNQbkE9/5KTGAUh7blORvrWUQfsRHp 1uQLxqPuCpe6rq+0o+S8dBIUJM9EM4gXhuhykNcA35MYUNqhVS7CEGiNqvPPMX4/Qywp Qw== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g91vxgtaf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 May 2022 15:50:08 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24OFku9e009151 for ; Tue, 24 May 2022 15:50:07 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma01dal.us.ibm.com with ESMTP id 3g6qqaq9ry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 May 2022 15:50:07 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24OFo6Af24052220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 24 May 2022 15:50:06 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9DE18136065 for ; Tue, 24 May 2022 15:50:06 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8971213605D for ; Tue, 24 May 2022 15:50:06 +0000 (GMT) Received: from arbab-laptop.localdomain (unknown [9.53.178.181]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTPS for ; Tue, 24 May 2022 15:50:06 +0000 (GMT) Received: by arbab-laptop.localdomain (Postfix, from userid 152845) id 8EA843A888B; Tue, 24 May 2022 10:50:05 -0500 (CDT) From: Reza Arbab To: skiboot@lists.ozlabs.org Date: Tue, 24 May 2022 10:49:54 -0500 Message-Id: <20220524154954.97241-1-arbab@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mIlXFmDYjR8gQJTqugDHPcGenrTDRflt X-Proofpoint-ORIG-GUID: mIlXFmDYjR8gQJTqugDHPcGenrTDRflt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-24_07,2022-05-23_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxlogscore=736 clxscore=1015 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205240080 Subject: [Skiboot] [PATCH] fsp: Fix possible use of null "%s" prlog argument X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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 Reviewed-by: Dan HorĂ¡k --- hw/fsp/fsp-codeupdate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c index 3cd5b2bc9bc5..112054517913 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"); }