Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp118893lqe; Fri, 5 Apr 2024 14:58:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+nCJNHFo+MOZ+fvkk50FhZjBKWh73Kl/uuG38rLWGWbqqdwnHVNClLVhwOKzyWLg1ph6ISFnz9tiCwJy9N8lr9/DnVAwaUXk6ifcfsg== X-Google-Smtp-Source: AGHT+IEKJYvrRTkIhPWhvS+EbykYm+EGrsVZKMc4XeUJm6hXUzdJlk2fGDTQj8WGkoTCfeDOYNIV X-Received: by 2002:a05:620a:2949:b0:78a:599c:e449 with SMTP id n9-20020a05620a294900b0078a599ce449mr3294222qkp.58.1712354320045; Fri, 05 Apr 2024 14:58:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712354320; cv=pass; d=google.com; s=arc-20160816; b=WtcgZ7rjGnw2T7xZz2uAPDebeORb11FngKHQZmv/xv/urYLBeD+LiYNGoFCyI6LDXn EIf5qpDou/GVa4uIw7TMBhfdhmMp9z/qXV9UbOz7CZizJCaiY2HlA7aTtGecS9Z+JqTo q73heAjW4Sd/UiOhdWaD2upCXmpZU5mV6/SwyqJvYvXT0DjRGhLitqsvL8LtNlPksVJh oKIErm4YihFdxf7giUUCVX1YrvlJh4yXoDn7z8OemZGk92jIQUkwY2C9r3jeZCRnt4Ez SHq1+g+BGUChX9P7xWrgVlzYyU3d7WdScBZcyloRN5ChOIRUR0LX9a7xS0ovuVeBDyXU kz4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=FYs/l19lyE/y5md5pl5/wiWrXS7ul49W9Gipadj6kzs=; fh=F/7ToMqWphjUpPQcjjvU1m782hIZjL8JW1jDDRDSxqs=; b=odevKMou7XtMZgWJD5NsnL4+dTyoQ3jdm6y1JwqupTxtin3hHhq6VgDBcDT+BqX/mp nZoz8QJzY9KsREI92ezj+VzXv7xEv9VrHEAuUL3RVz44sxkvUBbOWKilf2aWdvnsGgvB R7Mhr4EU7TBn7wPrXP7aCGqUC6HDWUtdiR2qf9P6vHwpSHYA3uw61NHzgsWFR6apkRF+ PnYMtBaftu2k3V6GBxBf3hM27Tv2z5foo5jO1MPg1Xe83wfNB+LSh1ikKctk/RkiWspU 7SUp5BqhwqaI7bYB83ZZ4s9TMZsi7ZtbyMCVbw24KRGwm4HLUzoG6gCey1ex1D/0Guyn koFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="0iwOBc/t"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-133656-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bs36-20020a05620a472400b0078a3261d02csi3156747qkb.280.2024.04.05.14.58.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 14:58:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133656-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="0iwOBc/t"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-133656-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BC2C31C20897 for ; Fri, 5 Apr 2024 21:58:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6081B1779BE; Fri, 5 Apr 2024 21:51:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0iwOBc/t"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HdmRh/Oa" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 6C4241779A4; Fri, 5 Apr 2024 21:51:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712353896; cv=none; b=fahMmP5hBaQDjUgUHuxRaP2wgjOdloKVMBdE+kDI3VhlHjYSzJlA2x6jI7mGPnNcvGfHYVtBK+YP13Gad11JI8GQHEwq3aR8Ey93oV5mama0KZVODoCXZ6jIf7v1LCnFlIHKjXNBqgpI6wZhMBonOVKkcUTsRwcBPxObdU3oG0Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712353896; c=relaxed/simple; bh=oKB2qd/NZJAjjB7QeYPo+hX4DK1YgoBLEsQYGwSIwoU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=tutDstbTqARfHxUPUNVP3oZWppOtCDJWYyVZ1h/p6kY9qpFikXrfKdLfCiimDtW2Sj/GoXPraDp8lpF0hA5Vx4FWW9retZt9b2dnTU2AbfvdOsMAd38XeVqtXw7Vln86ogISl/Wfa+g00VC4AYsNeywK8qlCpyH/1Ln5k0Hz8Lk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0iwOBc/t; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=HdmRh/Oa; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 05 Apr 2024 21:51:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712353892; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FYs/l19lyE/y5md5pl5/wiWrXS7ul49W9Gipadj6kzs=; b=0iwOBc/tRCaHu/3mc71pbVn/xvSEszWoVWSJ165pYlpxxLYlSJtuW7s0pp17GVaG9qQE6W drUuDTHWHLH96Lu+4bh8/FF/7n/7zB17N079rK1FGj1bPoEsDhc0WskGwmRmFJ7jqwTo8P 7Gyjlyzcz0Qt9FhqFvx0vj2XrGHJkXHtlpvjpKf6d8YSmHV8iwsHjisIa5vvO27bygb6ne UHUDmla9S7sX37r0AiJ9IvPcD3pOtvEGKChajuuulNUjBmsTfGrO7L4w4eGhmQoaAIK2MJ A3w3xVcFj/wggLefcl3gQnv8vYJEuuZeQcz+OCPepP1WiJV6jJyShBF841jnrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712353892; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FYs/l19lyE/y5md5pl5/wiWrXS7ul49W9Gipadj6kzs=; b=HdmRh/OamjGC0j1m1U5z+lZJULEOpY65/GLJrfvKBlR1ELqk/HnaZz0RFjfI1/izqgLeZX 6QCQUiMESilfNiCg== From: "tip-bot2 for Arnd Bergmann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/microcode/AMD: Avoid -Wformat warning with clang-15 Cc: Arnd Bergmann , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240405204919.1003409-1-arnd@kernel.org> References: <20240405204919.1003409-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171235389181.10875.6698872044485533713.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 9e11fc78e2df7a2649764413029441a0c897fb11 Gitweb: https://git.kernel.org/tip/9e11fc78e2df7a2649764413029441a0c897fb11 Author: Arnd Bergmann AuthorDate: Fri, 05 Apr 2024 22:49:07 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 05 Apr 2024 23:26:18 +02:00 x86/microcode/AMD: Avoid -Wformat warning with clang-15 Older versions of clang show a warning for amd.c after a fix for a gcc warning: arch/x86/kernel/cpu/microcode/amd.c:478:47: error: format specifies type \ 'unsigned char' but the argument has type 'u16' (aka 'unsigned short') [-Werror,-Wformat] "amd-ucode/microcode_amd_fam%02hhxh.bin", family); ~~~~~~ ^~~~~~ %02hx In clang-16 and higher, this warning is disabled by default, but clang-15 is still supported, and it's trivial to avoid by adapting the types according to the range of the passed data and the format string. [ bp: Massage commit message. ] Fixes: 2e9064faccd1 ("x86/microcode/amd: Fix snprintf() format string warning in W=1 build") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240405204919.1003409-1-arnd@kernel.org --- arch/x86/kernel/cpu/microcode/amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 13b45b9..620f0af 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -465,7 +465,7 @@ static bool early_apply_microcode(u32 cpuid_1_eax, u32 old_rev, void *ucode, siz return !__apply_microcode_amd(mc); } -static bool get_builtin_microcode(struct cpio_data *cp, unsigned int family) +static bool get_builtin_microcode(struct cpio_data *cp, u8 family) { char fw_name[36] = "amd-ucode/microcode_amd.bin"; struct firmware fw;