Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp186758lqo; Thu, 16 May 2024 03:23:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXismiRGFlJFWZmb5pxanGrcMAAIvt3dizdPTnTXv1HnB9Nmm863GLVnqb8f0xhsV/M1YfEWuI2bSDWoU1GZ4GBe7XBSTccuh/aJLeghw== X-Google-Smtp-Source: AGHT+IH+1SnD6gN9A8xFwaDwTtl3XNcA1v2YJuhpvodaVicx6sqc1m4uHd5zvxyvubCqBViBnb/N X-Received: by 2002:a17:906:31ce:b0:a52:65bd:a19a with SMTP id a640c23a62f3a-a5a2d672e74mr1141004866b.57.1715854981436; Thu, 16 May 2024 03:23:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715854981; cv=pass; d=google.com; s=arc-20160816; b=zbPZD4qcesk1R7LAUsgbNdKLmXHB+OuONpbfyn2orpBpAiq7YwA7SUWPEmVDDfCACE FQWlLHQEAAYqnFhi/bFjs6MTlcnXhGayXJrT5hWWFu6pnrdylMyHsHB+mhD3DVbN5uRl v127YKnSN/5axE8HoSmClN49VSVQ+/CKaXdfkZy6LWosSw+UWHFYJxSCzYzmqRgrLjJ4 fJHuPgHhdErg1Ho+DrzmUy8V59bL7/dwT+3eZ7AT/vJ6QUaTeSR50buoAw6VK8blFSWd LAcc+r22AdlG+tp85X0q9lCkVrQQpXBaa2LxLz92TtlEBWgMtEhQ1yFUHgSKsGWKPobH VVOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=DuIZvm84AN3+bGVV22QXu8kfhMkcb0cIVVJ2taOXA3U=; fh=uNFiRwBKepmreCcIKqide4owG72R8J+QVHlGojKuTIM=; b=F51qu9YO/T47+JQ21N40i7vt068vLrjmttle/PNXjTJXQqhdva8/GrzaiZ8tpw6/dq uB6fo1qw3l+MCX+MU/4cyNBHNdXvFyu1OVJZ4SYckUCNYFqDUcY5r9vVSkGa+GMM9gda XBRvxD7O1CI8WRzYwcs11eDwpRI4pDMR51IqHCdUdEbhDnPdbnTiGNhmV8sbvYFmad8g WGUn1KilxRK+6hIU0nokkScQGgZ2KSWDP1HBjI/PwKtx5nsL7IINkQzw7O9vQMSg7LCJ 307WgarVXVNeZnGsDRV2Oiz2kS5/bOy9HC5l3twvWeDQ63GX0FPkHwEuqA+DnpHMVWdv g/Bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MInJD0O0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180900-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5cddf227f0si109498566b.679.2024.05.16.03.23.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 03:23:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MInJD0O0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180900-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 2C1AF1F24C38 for ; Thu, 16 May 2024 10:23:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A443E143895; Thu, 16 May 2024 10:22:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MInJD0O0" 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 CD2F3143754 for ; Thu, 16 May 2024 10:22:45 +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=1715854965; cv=none; b=uwM4lv4dmm/z2Z0oyWOEdlEcWF2LHtMwqybSy740YENO90a3isQK0Sdkgrx+Z9UdHcPNwGX9yFxA4SLYfUpm8tZyVJA96s/H2/FFrbBgZjhEpvyTB41HCxXy3O10//2R0REBqsY8uf9OaS8UNmulwO0d0wmUX3ZDAV2IobY6GY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715854965; c=relaxed/simple; bh=4RESYLk2bxiIAc2MMrElvplj/bOnF/qlafcOgSEVD4k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RV8XRqPqs4nMThDnX1a1vW8bAo7ayNjsGmwpTebnRodqp2Tuyk+skMiVZaxP0+OnT4PCM6Xx+ilvIIwPsuOQnqj8CWGgJwWADXunyIgiZgoULV+UGEaNHwmxiSFJjoCydy8gO36YOyqfsQ8w0sKLL0xOs49oDt2Hlov8yrjhAMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MInJD0O0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68333C32786; Thu, 16 May 2024 10:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715854965; bh=4RESYLk2bxiIAc2MMrElvplj/bOnF/qlafcOgSEVD4k=; h=From:To:Cc:Subject:Date:From; b=MInJD0O0w3I5bZuGy31dUwr8mUye/DTHdK17Mgrpg77dVf82/nj9Hh8UvkZ9KkVgc hdOjnlXdWnOeBrJLyeMhV7umhv44hBf4hAEsnqrUe1H78W00D5Qi4Jh/bdFFi50LR2 WGuM4Tu1P/hyKAf1GAYLkc1u6rfKOzNXDAEsWvxOQ3IJJoPUUZOJDPWB2XLHlwoTzT e8Y4UJrgRaDYxAHU0BJ4wNyqncyoWfcsIjOMVK0RbY7MNUNy3v3YgsMal2dkgQJvG5 0iF0Rh07pbjTuKOWiESdTH9VzHnJHD8XDkizCgyS8y5aiZzyAocdsUF74q1wzPhdSA suZHtYHCr9AGQ== From: Borislav Petkov To: X86 ML Cc: LKML , Borislav Petkov , Borislav Petkov Subject: [PATCH] x86/boot: Add a fallthrough annotation Date: Thu, 16 May 2024 12:22:40 +0200 Message-ID: <20240516102240.16270-1-bp@kernel.org> X-Mailer: git-send-email 2.43.0 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: 8bit From: Borislav Petkov Add implicit fallthrough checking to the decompressor code and fix this warning: arch/x86/boot/printf.c: In function ‘vsprintf’: arch/x86/boot/printf.c:248:10: warning: this statement may \ fall through [-Wimplicit-fallthrough=] 248 | flags |= SMALL; | ^ arch/x86/boot/printf.c:249:3: note: here 249 | case 'X': | ^~~~ This is a patch from three years ago which I found in my trees, thus the SUSE authorship still. Signed-off-by: Borislav Petkov Signed-off-by: Borislav Petkov (AMD) --- arch/x86/boot/Makefile | 1 + arch/x86/boot/printf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 3cece19b7473..343aef6d752f 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -69,6 +69,7 @@ KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables +KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH) GCOV_PROFILE := n UBSAN_SANITIZE := n diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index 1237beeb9540..c0ec1dc355ab 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c @@ -246,6 +246,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) case 'x': flags |= SMALL; + fallthrough; case 'X': base = 16; break; -- 2.43.0