Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp599615lqo; Thu, 16 May 2024 16:08:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgs9mvgt8JkTo84xA4NodRYvnwkh9wUVXgyIGWjQtRT/1+jOrn9RAv5W1kPEIov/vJWxQ/pwDd4g7hrRmCgsFw7dPO87KNbMtn+IsU+Q== X-Google-Smtp-Source: AGHT+IHgCyubHmn/z7+PYVaE0SviMrusB9dmOJY4mSO774i5WFKzmBBMOkjxtZTPKcGsMLBUvWBn X-Received: by 2002:a05:6214:3f8b:b0:6a0:5557:b111 with SMTP id 6a1803df08f44-6a16821a799mr258460026d6.53.1715900918744; Thu, 16 May 2024 16:08:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715900918; cv=pass; d=google.com; s=arc-20160816; b=qnKnHn4KlMgOa0BZF6k9rJshHMb7S9DOGBrVWfcKvuWgSQOhafEM5LuS1LzrNerBql w4otQqVKzugOi6tj0IE8dPwCw0HzNvaBEl2S1AQwIipPzPzl3UwWGLL3GoH5VFXqmw3Q 5xz+hdARiO80FkmIQfyymiJ9VToaToXEpjtM5ZIgjurxEIuUhmTtF1FnLY/g+xEoUUqu oQV4Bk42ot3qfWojmhJgBikTEyc8MhvYJUTbJ7rLyjFUKz93Gn9fDmLjIz01GmFVe3f6 U6FOD3N9BrHjv7TbBOIQ3MyqBy7Hzfzjfi89YE3qKkxZlrlVYVsFi84PuSGeA2s8bJy5 ZTYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=gak+/oovP81PfogPpqJsHd/1CwWJ9r/ylbJlVjZgFRo=; fh=SbRTvRuuGSQTA/TQ+LyBJVfYINd4U+vGy7JAG++jfYA=; b=m6k7p3LFB0uGfuWbE+URKIymavsLEW1HGgP72QvAqEq6sLj/q3RUUQBkYANnLsQkgh bJl8oz2McKLzVTl6xTy66ja8N5B+m2Q2avXtlCljxh54OQIAov1+YZYFD09jlHXCQqkE HM7QEyiL5fOjcgxV0RCFaRKszHiIau15RNrGSA7Sc2QQnRMrjs9mfhiXS/I2+QfsWaX0 LygDhaDP8XZQgMFHmgMzZ/rM/7AGBUiP5/TGCdDZfVToslDzua/QHn/sv9SnI8i6vtCn GmQJEBiyHWU/6s4WPoQR3ynMOoYz9rLc6cflxP4YF97ucFMnTxuMKci2mIZd74ElINj2 vSvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VaFVwiQQ; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-181630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181630-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29b3b7si174323086d6.295.2024.05.16.16.08.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 16:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VaFVwiQQ; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-181630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181630-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 77B201C214DB for ; Thu, 16 May 2024 23:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D10282E646; Thu, 16 May 2024 23:08:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VaFVwiQQ" Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E066F27269 for ; Thu, 16 May 2024 23:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715900902; cv=none; b=Yn05I+gME+w86s4cRyiTubjblDJl1yWI+iMM4x0DRrxgwFCbKHRM7sDxLqZ32V8GOBgbjpk+hZg0c3jKkG//GyGdHD2ls9GG8jNDoNSQUkxTpemRXJazrQzKLXcBjM8ECS8N+86KzRdtvNMJco3UHFatB+lAzvgXleHk24f0xtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715900902; c=relaxed/simple; bh=EP942SqgqU+2g95deuGJUqyAMQDCgoYsK8UTO8Gxpcc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=moZi04aLj4eN312vEFOJ5VP2Pk2alYA7whyEFSciqzopX2WEDw8I8p59LD3pJEjtLnzshNsAraVL+xEWheGyJ5JxCntOLyPGXSSbc6dk4a02ZikdwgX+PkiK6g2jtvZcdBV9QmfJP1Rab2Qn0b06cR79YVaoXupUu2sbTza3wOI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VaFVwiQQ; arc=none smtp.client-ip=209.85.222.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ua1-f50.google.com with SMTP id a1e0cc1a2514c-7f74cca5a2bso25083241.3 for ; Thu, 16 May 2024 16:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715900899; x=1716505699; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gak+/oovP81PfogPpqJsHd/1CwWJ9r/ylbJlVjZgFRo=; b=VaFVwiQQonng/gkW5JDVk2XG3oZJgOWtoLasmWZZXswJ8s/fuLmCQgzIeaVR3h5GkT CYHuxQ9+AoFU7VzYIrhrnxAn3RhTwzEpI2yfC3l8hxGWs9WsTvwra9ygVJPs2+7BXaYU NAK07jhm8354GuT0+u/nNofzFEUK6O+RTNoTbqVStDlylExqdUwDhauG8iqAG6EGmgam oroXw4d+WcTSyWCghGHd3/EEf3AQUPTss8+6EX8db4lAYzDakZr2J8kARtY0isCaicKC MUfMuKXapJuMRKaNaXbev+zfUoOb8y09JSPB5RR37a9Q1XH0OKWG8qRhTEi/ZsouDfx3 GIFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715900899; x=1716505699; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gak+/oovP81PfogPpqJsHd/1CwWJ9r/ylbJlVjZgFRo=; b=fW8atax4aR4YwGECv4YHcNlS2CjOpqli8qtCT/iYQw0OnBXP0hYenQ7B2mhy4vzxgs DTrfaDV4WEu4VD599Z3kCMAZSrjnMDD0CFDZCsGYyMT4HFnAcfBmkgAIYUzEVoTA+yIF l56A7/VEueUX0HQGem8NAtC7KjAkE+v53crUGkyQ/8ludxHQ23ZsUU7PALZjdvMeBXQ0 cIuBEXkcZFG9KEE5+mNfAyy+hW3HD0F5i/q5hDKgcgf+cDvI7F4/GsiTg6moRGwrZcJd xmNvHUFlGIZM5oGofMY8xwc95DUXX105jAYiLdHaGPC3SwicrMXlDD7bopSqesXSOx00 2Rrw== X-Forwarded-Encrypted: i=1; AJvYcCX7EwqWDtk+OCxy+dIGuPlr9rwF+GPEZoRaRIleJlwtDYF4lZHTQ3kuxC0/2KT1ARr0E70EjPBpf/8WBb+tvOJO8kz2hRfDP7jz0ZH+ X-Gm-Message-State: AOJu0YxhaolhVmB7IxYKnW32TQ2pXRdDiK1XJz5JzqArV+/GEA2zPBDP v2OnkI3x0Z8VMYFZ/NihlU2J3H+xqIIZV1UwDLQlZ+pHKAkLPM+QK0+/k8SikvEZCWjOue7pkQi eeWcE4nqxHtpImsPPecI9WZBquqJGsVRLVULE X-Received: by 2002:a05:6102:3e26:b0:47b:b8a7:7ddc with SMTP id ada2fe7eead31-48077eb4acdmr25780377137.30.1715900898508; Thu, 16 May 2024 16:08:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240516-x86-boot-fix-clang-implicit-fallthrough-v1-1-04dc320ca07c@kernel.org> In-Reply-To: <20240516-x86-boot-fix-clang-implicit-fallthrough-v1-1-04dc320ca07c@kernel.org> From: Justin Stitt Date: Thu, 16 May 2024 16:08:06 -0700 Message-ID: Subject: Re: [PATCH] x86/boot: Address clang -Wimplicit-fallthrough in vsprintf() To: Nathan Chancellor Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Bill Wendling , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, kernel test robot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 16, 2024 at 7:03=E2=80=AFAM Nathan Chancellor wrote: > > 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@i= ntel.com/ > Signed-off-by: Nathan Chancellor Seems simple enough. Acked-by: Justin Stitt > --- > 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 |=3D SIGN; > + break; > + > case 'u': > break; > > > --- > base-commit: dd0716c2b87792ebea30864e7ad1df461d4c1525 > change-id: 20240516-x86-boot-fix-clang-implicit-fallthrough-fc5c9bb19765 > > Best regards, > -- > Nathan Chancellor >