From nobody Wed Dec 17 08:55:53 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C710E4502E; Thu, 20 Jun 2024 07:34:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718868863; cv=none; b=hEP33tDuhWZQHKfEu5v/hS9QrX3Ok0KrbYlqKgYvXy3vXPdIQ3qhQzL4mW5gcLvSGWtpNe8Wcjyp0+uPEhsdtqcoMe3YNsa4UMlzCZtUIwSPZBHcgq40EQeZps/PTUv42udrwoCU2A5JyHsiij0uZqICDzm+Z5H8g/Y1YPMu7oQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718868863; c=relaxed/simple; bh=RMYZrT95nApMxsG7y6LLT3Z2HeuOH/cK6XfnlqABCbY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=S2tIKeN8518yJQLF8lNDgdBuqaTGvim5HBU6b8Y+tG8d4Z/ZNwIObJX/wYhnN/ToQ1kbkq7cCNBXKSwZiXlFYx6qMliQe73m80XBkTtsdtFEUCXFBG5Cw8sO8JOwlMF0FHCu6wJHT/er7dO6rtRNJzxZyno1AYKtvaGoe6f2D28= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FE25zTHQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FE25zTHQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CAAAC2BD10; Thu, 20 Jun 2024 07:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718868863; bh=RMYZrT95nApMxsG7y6LLT3Z2HeuOH/cK6XfnlqABCbY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FE25zTHQi4ytQKbeZMcrPyKDIkmSCxWXkdHSz5nhoD+NRAOUeXHh2buaVpW6QyL4y gjyMs6csXBjTOtozo9VL5o5bNvsyheSbSym43QD0IiEXcep9cVcFMd5p72UqeL0ikP SpLoteCfqEWefBWarw/72v1dzhvULaEdpSRuQRD5SV+yEE0O1VsALy2Pfe+S/IitWt pMqDxsKQaSkwEJxYWaOel5iFQwnCusLPv+ryZumD/dbt0+MAlWWYVZQK4BHDxdknOR 7KCf9URhptR6CFaajeKqfajZJFOV34kYbB3VnJFiZel+iJW8+mFuBFbzfv7HR3SV5n ymOLbXpH3SFSA== Received: from mchehab by mail.kernel.org with local (Exim 4.97.1) (envelope-from ) id 1sKCJI-00000003c03-3Q0c; Thu, 20 Jun 2024 09:34:20 +0200 From: Mauro Carvalho Chehab To: Cc: Mauro Carvalho Chehab , "Borislav Petkov" , "James Morse" , "Jonathan Cameron" , "Shiju Jose" , "Tony Luck" , Ard Biesheuvel , linux-edac@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] efi/cper: Adjust infopfx size to accept an extra space Date: Thu, 20 Jun 2024 09:34:12 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Compiling with W=3D1 with werror enabled produces an error: drivers/firmware/efi/cper-arm.c: In function =E2=80=98cper_print_proc_arm= =E2=80=99: drivers/firmware/efi/cper-arm.c:298:64: error: =E2=80=98snprintf=E2=80=99 o= utput may be truncated before the last format character [-Werror=3Dformat-t= runcation=3D] 298 | snprintf(infopfx, sizeof(infopfx), "%s ", n= ewpfx); | ^ drivers/firmware/efi/cper-arm.c:298:25: note: =E2=80=98snprintf=E2=80=99 ou= tput between 2 and 65 bytes into a destination of size 64 298 | snprintf(infopfx, sizeof(infopfx), "%s ", n= ewpfx); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~ As the logic there adds an space at the end of infopx buffer. Add an extra space to avoid such warning. Signed-off-by: Mauro Carvalho Chehab --- drivers/firmware/efi/cper-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/cper-arm.c b/drivers/firmware/efi/cper-ar= m.c index fa9c1c3bf168..d9bbcea0adf4 100644 --- a/drivers/firmware/efi/cper-arm.c +++ b/drivers/firmware/efi/cper-arm.c @@ -240,7 +240,7 @@ void cper_print_proc_arm(const char *pfx, int i, len, max_ctx_type; struct cper_arm_err_info *err_info; struct cper_arm_ctx_info *ctx_info; - char newpfx[64], infopfx[64]; + char newpfx[64], infopfx[65]; =20 printk("%sMIDR: 0x%016llx\n", pfx, proc->midr); =20 --=20 2.45.2