Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp308358lqo; Thu, 16 May 2024 07:03:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAyJSTVYZI5XPK00BeCicvBS9VcTqU2LeHD0UxOKMx7LCdip6WAWyXLzqDbyWqiWBQgT08ngWG27jHncvUf2yM3t29nOkN5pVZsQIZng== X-Google-Smtp-Source: AGHT+IF5Rb3CZe0tJPL3nM1cWsHDlGyJlMFus+u5c8shJsran5psjpKkXNbpqtWi3+41UHcFv8x0 X-Received: by 2002:a50:a45b:0:b0:568:32cc:f808 with SMTP id 4fb4d7f45d1cf-5734d5cf9a5mr12508200a12.15.1715868232939; Thu, 16 May 2024 07:03:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715868232; cv=pass; d=google.com; s=arc-20160816; b=fGB5+tkeo7xu+So3w7dU4gh6wpN2AOFlvEkKfvU5JOT+N8cZTAdw3jHXSMfN5ucm+k 4XWvobHY7ZD5LWQ14dFVpHyjelpDPSVT40mKUITMsJW6hwOakUKW5CgKpqjXhrCtpBr3 zaYfSZxGKiwS75L+kNttDVNICEg3FMplda+h3S0ZSRRmyHHlioY4POhM/DTugygEdUhG d+RSrohgVcnuRckTAvcl/cIMmhQhRHmQIP4C33ZHps2jYriQYusXY7aKiFxJw6+Xq1cz 2RWcDfRJLVALpfq5PuyHyYYulEeseeKwfcOVS5mzw9wdjztGMfKhGcC/vyzn3Lsjxlni gu7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=sjjv8eMbFz1GYPM+uxv6jV6YSwlQsutbFD6ed4lT7+Q=; fh=YZ4ilb/MiUtOb8zgTfIBL9SCXFN0s9U1yzm0iF3zHuU=; b=sdStJVdekw3l5io/wsZGZdsSmablG+CkRPN1s3JcRE4BcqB2QopCoAzmOrfA7UxOhN IzDwmb6nHgHBh4+O/0AXR69+0qP1tZt7aFcfw1ak3reiRBH/mf8raQk9m+JXeAh9e7QX oZxCAxnUee+gFP1OkB8F0wF69F1PkaUeFTt6EzQdCoYk7dV0/LQ5hiGX4aiStVrl2Qpx bl+X9+COFOf3g9S3YvCzZGMaU1xOe4vjd2+og8awr/l6Sk6PTGGbJPb9ZKvdZxTvTDms VbAHCs2Gj/d09ZLR8XJVkKjB4SUyYkl5CkHoxF4DRbMRDOD/YDkvqvB3ZPhPjnuLAk6V 9xtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Drw8Zuny; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-181147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181147-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574fda86a75si1474474a12.688.2024.05.16.07.03.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 07:03:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Drw8Zuny; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-181147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181147-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id DE98E1F22B2B for ; Thu, 16 May 2024 14:03:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C8ED1494B5; Thu, 16 May 2024 14:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Drw8Zuny" 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 63085147C75; Thu, 16 May 2024 14:03:47 +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=1715868227; cv=none; b=KyTz2V+ZvKkVjwT/0N/v90iLw+yXs77HG08R4UvXGTg+o8qtDKHosgmUO5srbm38Ng/T/JVrmWuhyGliegC6oAn07zi7rXA5hB41pOCwvqAG6Nqc4WhpjGPFzXzCIEJFhptzBGXnITU8wK+6g65HczgtKSOc70hYeyU1bV6ZHyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715868227; c=relaxed/simple; bh=btau07SULIoJqAYVzbVYOn4odv7J5jQdnBX5OjVK4G4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=U1GIqgwE4Y02uBfsjeDm0ekVvfUnZtMGzRpJVLNl8By7ASkK96khoOMh3MELsdw2AazFkrVn2NY6Po9OuaqPVksoRQUyAVeu0hE1ck6VpJc3BpSQDkWc9QtRId127WJmX1f0ialfvuqIcSWZe1APaKX+rq1KOPabIA6QZXo2qDs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Drw8Zuny; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98387C113CC; Thu, 16 May 2024 14:03:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715868227; bh=btau07SULIoJqAYVzbVYOn4odv7J5jQdnBX5OjVK4G4=; h=From:Date:Subject:To:Cc:From; b=Drw8ZunyLWTr0nM0rJ68C/Qs17bPqqTgPav4i1mGgj2/L27YwXmx4oZjSv7CNjyCi 3ObhB/MpoSlxm0DigGTMGuE+plKFoNl91gH2B+GxdKDTGW8BwepQOCwBioUVFmvR6r VERV9RbO0dTwfKKr3htsi1Iblz3WALW6tUsRpmnyIjK03hmJbAPqSNYYVuN8RjdR5P dliR0k/KQ20XL1ccOSlhdwSWyUFhSE4umJB819p4TTpRcn7qavEJz0eCTRIOvREhwc NjGkrSaGwzOB0c8LknuaND4gAkoNrCqqthBLNN/vIivn3O7ADidW4SzXkDlJZivOm4 7qhhsK0PS/1GA== From: Nathan Chancellor Date: Thu, 16 May 2024 07:03:41 -0700 Subject: [PATCH] x86/boot: Address clang -Wimplicit-fallthrough in vsprintf() 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: 7bit Message-Id: <20240516-x86-boot-fix-clang-implicit-fallthrough-v1-1-04dc320ca07c@kernel.org> X-B4-Tracking: v=1; b=H4sIADwSRmYC/x2NwQqDMBBEf0X27IKRJmp/RTyY7WoWUiOJLYL47 116fMO8mQsKZ+ECz+qCzF8pkjYFU1dAYd5WRnkpQ9u0j8Yah2fv0Kd04CInUtQKynuPQqLRHOM RcvqsAReyNHhvhs5Z0LU9sxr/p3G67x8/+nHAeQAAAA== To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, kernel test robot , Nathan Chancellor X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1475; i=nathan@kernel.org; h=from:subject:message-id; bh=btau07SULIoJqAYVzbVYOn4odv7J5jQdnBX5OjVK4G4=; b=owGbwMvMwCUmm602sfCA1DTG02pJDGluQk73OprDal7ErGtaPL/fzVM1ew6D8kGH9DdR834W/ HZbf2NqRykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZiIHBfDP71rcTKm7x0Y2SX0 I0s4zSc45au+t1qy/qCzwtG3pQteODIy/NsZvI1Z6vjeiqfiWrXB2x2l+cR1DM7/SDilMyVTit+ WBQA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 After enabling -Wimplicit-fallthrough for the x86 boot code, clang warns: arch/x86/boot/printf.c:257:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] 257 | case 'u': | ^ Clang is a little more pedantic than GCC, which does not warn when falling through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to silence the warning. Fixes: dd0716c2b877 ("x86/boot: Add a fallthrough annotation") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405162054.ryP73vy1-lkp@intel.com/ Signed-off-by: Nathan Chancellor --- arch/x86/boot/printf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index c0ec1dc355ab..51dc14b714f6 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c @@ -254,6 +254,8 @@ int vsprintf(char *buf, const char *fmt, va_list args) case 'd': case 'i': flags |= SIGN; + break; + case 'u': break; --- base-commit: dd0716c2b87792ebea30864e7ad1df461d4c1525 change-id: 20240516-x86-boot-fix-clang-implicit-fallthrough-fc5c9bb19765 Best regards, -- Nathan Chancellor