Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3114332pxp; Tue, 22 Mar 2022 12:22:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4TelTOFLqvyw6A3nkZwhiUMl9UTK8IiRSFaqUci95ak067M2znHGUBj5ng0MZLfwzPtiL X-Received: by 2002:a17:902:f682:b0:154:8500:80bf with SMTP id l2-20020a170902f68200b00154850080bfmr5044596plg.112.1647976973065; Tue, 22 Mar 2022 12:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647976973; cv=none; d=google.com; s=arc-20160816; b=JF+HPeghdQwCqOrEkn2WvDA1bpg9E4JbpbGlAvSsmnx8GGxWCOyMf0PWG11Luk4F9d Jvi0uIE73BCkGC6Z6Q1qt2voEBsLsLzZXDhMnwBIFMSfXI9+mIice6nTTwiC5SVyZutK 7lIJ9AkQuMWazQ3uij1JlGV6vWu8YtxNiwo5O8C3BM44NyTrmAu94bL5JHriUqHFUT18 wuup1HYPfek232yICAYD10FOY5Ctb+/KiQT8Lhe09mYQRUSDfqayt9qZPYAO8lE6sh61 RTZkPo+QGo+dNsZY7YG2Mk4HH969aGymaRAbFXoCiTh3cT+D9Tc1qS8QCbOXTHjGLE49 mH0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XBEtYsWbDBy62pJoZCh/rE3jS6b1BLDeq5dVdHPckWw=; b=qp33ZRFaroYgo7GJp7KcwWhqhvVd34i/khWrE/i8gVyX7MNMWWTqJzOdOTHp6CyFB+ 5e5fWGqo1l7a8IV6kcIHVKlklnG1H0hZYoV+9iv2AB2nIfPJ7u8QFcBVUPu+1a9ZRbf7 MY3E80e9yyD1pnKAOTcNArOpwU6+tGuI44wEF2T+u8cziTZGDa7+Ub6bEjiBbpYxwMGa /88BE/OoM+kirgcBxkntdnxOR7RD4I0M5Muc9DuW6tqp5DXu+0zqBaYg7N5QF8WJ+Fnr 7VwwTPHDgyeOtIwkMn803uOBn2eMaX/rpizbQFnLCVxAjdwVzI+ZZP7GGtjvCfa6pFWE sbWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EVFcIZdn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l3-20020a654c43000000b003816043f071si17994837pgr.614.2022.03.22.12.22.39; Tue, 22 Mar 2022 12:22:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EVFcIZdn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235833AbiCVPbT (ORCPT + 99 others); Tue, 22 Mar 2022 11:31:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235827AbiCVPbQ (ORCPT ); Tue, 22 Mar 2022 11:31:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 468A18BE17; Tue, 22 Mar 2022 08:29:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B6FB661156; Tue, 22 Mar 2022 15:29:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9FD2C340EC; Tue, 22 Mar 2022 15:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647962987; bh=/wuEi/uvh9kikMVTzBLXcTmFI7rUcMU9g6h8WZNahOo=; h=From:To:Cc:Subject:Date:From; b=EVFcIZdn2T2OgMOmHo6W2hdIUGauN/2ICQ4guSLkCKzKzyqQ8WfXaCbRHHYww3TzJ mXgi7Xjp2AOvOzizJzkInSiM+Pbl2ujkBtKv91xa64shP83PfV7G5E6DI1ye9nN9sb tPUpA8lVMJTmg002dbHBLUXpg93+i4a90S6tlPYc6E3JucrZ311RnYqFqQASpxWnRA yl+iG/L6qhqHt7prt2uMj9r4hwDwQxAsv6UoGpxTazGxrMhU01QKAW7y5G6c25vKOJ Wy/VPs4MpT3QaCbvEc8ju8Zf5yAsCzZKwVbOAZHOyAT9cM8AYAswv90Wp57e0wl0MN q52QnKjboEpng== From: Nathan Chancellor To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , kernel test robot Subject: [PATCH] KVM: x86: Fix clang -Wimplicit-fallthrough in do_host_cpuid() Date: Tue, 22 Mar 2022 08:29:06 -0700 Message-Id: <20220322152906.112164-1-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: arch/x86/kvm/cpuid.c:739:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] default: ^ arch/x86/kvm/cpuid.c:739:2: note: insert 'break;' to avoid fall-through default: ^ break; 1 error generated. 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: f144c49e8c39 ("KVM: x86: synthesize CPUID leaf 0x80000021h if useful") Reported-by: kernel test robot Signed-off-by: Nathan Chancellor --- arch/x86/kvm/cpuid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 58b0b4e0263c..a3c87d2882ad 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -735,6 +735,7 @@ static struct kvm_cpuid_entry2 *do_host_cpuid(struct kvm_cpuid_array *array, if (function > READ_ONCE(max_cpuid_80000000)) return entry; } + break; default: break; base-commit: c9b8fecddb5bb4b67e351bbaeaa648a6f7456912 -- 2.35.1