Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3212566ybi; Mon, 29 Jul 2019 02:52:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyqNRVq3/pMTmLa6H1ulRe0p1QF1DJqaHk3xNRfSpd9zL9WoGAM9gJAm4GYXSYEqHmxar/ X-Received: by 2002:a17:902:be12:: with SMTP id r18mr103956030pls.341.1564393940102; Mon, 29 Jul 2019 02:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564393940; cv=none; d=google.com; s=arc-20160816; b=zfCfXKuC6F2DitK6RvOxMkjAo6swLp1shyf066g/f6Edx69SeNYojRBWqGhdjwgzTq ReyZxuxGclAErEIo93GWX9YCmxiH1jXGpykEpTR0F3Og49zcDIuZHqfVVOJzx4lTBEf6 ctmw899hBHI6fYKtNnRWk8pYhf2N6bLY3/qJuGdPSgavHrUmqE61V8LpGkBvYL97Cbfa vUBERWBQmYODO4XIkhXiOywu6Q3JbJcuHSUCK6eBQeSfqNrcF8RaCfgUCH36O6m3RD5f PNkB8lEHJ5bWn7zcF0rFWSoJ2bQ3pdxxbhTWBkwAlKkLiapFp0YB1Dl86x0/yt1Uqgtc xcWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=4z1TKyWQUxFUDSdyIg0GMMf02IKaTRawkHILRelmU9g=; b=WaNYfaQqqbrESkNskCPlp/IGbjp0yc02HtraPVv7Y95fb0Kig7eb7UrgTtX0la06+O uLCglIKn1hN94C2fvaaBAj2o/eg5eL/JTPphLZHZtVcyddVXSf+VESoGJKbIM2JYQ32X QFPvMeK7RztlSojXWeD26/YWtVLUmSdSotFWrV2mvDxDjJyoxWgKVsrtUc/JAdZscBCt XbN6HtQWIC2e982UD8+CARdTHqWZGMPadhwJNX+q6dLSY6g8Dvu86+2pjj7oaBTwrLZp lKrtMhb7yiwH0mZiL1iJEH4DSfDRwy6R/cPoJHTmsXwYympONxVXcqnebM9cfyZbdD8A utew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si7784605pgk.246.2019.07.29.02.52.04; Mon, 29 Jul 2019 02:52:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728124AbfG2JvW (ORCPT + 99 others); Mon, 29 Jul 2019 05:51:22 -0400 Received: from foss.arm.com ([217.140.110.172]:40974 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbfG2JvW (ORCPT ); Mon, 29 Jul 2019 05:51:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4B4DE1570; Mon, 29 Jul 2019 02:51:21 -0700 (PDT) Received: from [10.1.197.61] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 988DF3F694; Mon, 29 Jul 2019 02:51:20 -0700 (PDT) Subject: Re: [PATCH] KVM: arm64: mark expected switch fall-through in HYP To: Matteo Croce , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org References: <20190728231949.6874-1-mcroce@redhat.com> From: Marc Zyngier Organization: Approximate Message-ID: <181597ab-f38c-73f1-4404-5bbddc451f85@kernel.org> Date: Mon, 29 Jul 2019 10:51:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190728231949.6874-1-mcroce@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/07/2019 00:19, Matteo Croce wrote: > Mark switch cases where we are expecting to fall through, > fixes a 130+ lines warning. > > Signed-off-by: Matteo Croce > --- > arch/arm64/kvm/hyp/debug-sr.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c > index 26781da3ad3e..c648c243f98b 100644 > --- a/arch/arm64/kvm/hyp/debug-sr.c > +++ b/arch/arm64/kvm/hyp/debug-sr.c > @@ -18,40 +18,70 @@ > #define save_debug(ptr,reg,nr) \ > switch (nr) { \ > case 15: ptr[15] = read_debug(reg, 15); \ > + /* fallthrough */ \ > case 14: ptr[14] = read_debug(reg, 14); \ > + /* fallthrough */ \ > case 13: ptr[13] = read_debug(reg, 13); \ > + /* fallthrough */ \ > case 12: ptr[12] = read_debug(reg, 12); \ > + /* fallthrough */ \ > case 11: ptr[11] = read_debug(reg, 11); \ > + /* fallthrough */ \ > case 10: ptr[10] = read_debug(reg, 10); \ > + /* fallthrough */ \ > case 9: ptr[9] = read_debug(reg, 9); \ > + /* fallthrough */ \ > case 8: ptr[8] = read_debug(reg, 8); \ > + /* fallthrough */ \ > case 7: ptr[7] = read_debug(reg, 7); \ > + /* fallthrough */ \ > case 6: ptr[6] = read_debug(reg, 6); \ > + /* fallthrough */ \ > case 5: ptr[5] = read_debug(reg, 5); \ > + /* fallthrough */ \ > case 4: ptr[4] = read_debug(reg, 4); \ > + /* fallthrough */ \ > case 3: ptr[3] = read_debug(reg, 3); \ > + /* fallthrough */ \ > case 2: ptr[2] = read_debug(reg, 2); \ > + /* fallthrough */ \ > case 1: ptr[1] = read_debug(reg, 1); \ > + /* fallthrough */ \ > default: ptr[0] = read_debug(reg, 0); \ > } > > #define restore_debug(ptr,reg,nr) \ > switch (nr) { \ > case 15: write_debug(ptr[15], reg, 15); \ > + /* fallthrough */ \ > case 14: write_debug(ptr[14], reg, 14); \ > + /* fallthrough */ \ > case 13: write_debug(ptr[13], reg, 13); \ > + /* fallthrough */ \ > case 12: write_debug(ptr[12], reg, 12); \ > + /* fallthrough */ \ > case 11: write_debug(ptr[11], reg, 11); \ > + /* fallthrough */ \ > case 10: write_debug(ptr[10], reg, 10); \ > + /* fallthrough */ \ > case 9: write_debug(ptr[9], reg, 9); \ > + /* fallthrough */ \ > case 8: write_debug(ptr[8], reg, 8); \ > + /* fallthrough */ \ > case 7: write_debug(ptr[7], reg, 7); \ > + /* fallthrough */ \ > case 6: write_debug(ptr[6], reg, 6); \ > + /* fallthrough */ \ > case 5: write_debug(ptr[5], reg, 5); \ > + /* fallthrough */ \ > case 4: write_debug(ptr[4], reg, 4); \ > + /* fallthrough */ \ > case 3: write_debug(ptr[3], reg, 3); \ > + /* fallthrough */ \ > case 2: write_debug(ptr[2], reg, 2); \ > + /* fallthrough */ \ > case 1: write_debug(ptr[1], reg, 1); \ > + /* fallthrough */ \ > default: write_debug(ptr[0], reg, 0); \ > } > > Already reported here[1]. Thanks, M. [1] https://www.spinics.net/lists/arm-kernel/msg743592.html -- Jazz is not dead, it just smells funny...