Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp786155pxb; Tue, 5 Apr 2022 23:16:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx54rZv7mPNNAXB4cdCtEqtirhcTyAbH66CPLKwduvfn7wiXZ8Ow3io3c3gZumYouAYiMl X-Received: by 2002:a17:90a:4bc2:b0:1b8:cdd3:53e2 with SMTP id u2-20020a17090a4bc200b001b8cdd353e2mr8189431pjl.219.1649225788496; Tue, 05 Apr 2022 23:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649225788; cv=none; d=google.com; s=arc-20160816; b=hVCLPvoUNYwxuH91iTk9/ErcDu5PfGNfso/te7o9w5RRHf74z7jRwBX71DJNbObuUx nkO/N/YAkfkr5Ci87SdMN3OCDK4dAwC4bRIuOShyOnr5xq4o+2p0xBgXlVQA09wjNh15 PIwuAmXsexXAw8DoxLtjDa/KqXyUJj9/Nj+ALR7MkRfwXmrBwt5WRQJtTBoIn50FkwYU 2zef0z10IZX4SV4DRX5olrBrjuLZQV1vcq7nMICxuPRhUFE1eJZY6qgmYFYFD7Z8Rnml NjOo9GjyYqbC/7LApC+cz0aE9GApHXL3LfYDVlanyCcajKkpazPFFlr+HWW7qMGNXP8i Jnbw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Dwlao6/Ot1dIy/wUGB+wWDHG/j8fraRHrJGdigCRP3Y=; b=vUFnU7fN1pI8l0rynTTu0NXQRr002ezurR8VxriW03om7UOttRISLkK0J9ZF4i97ij x5msLSMtWNXSYhh2TnDEe2WXQQrFTKXAdffw0ibUh4gjgvjB5ZZEaz88EmGK/pp2M4ul c8KaSteYzAjlAajr6UfDUrBs0TYzdOfMLm9GenGsjV+6P8HBUWqiUES8NurHjWEgpmX7 +Nnz3PJ4qCVlq0zO4Lm4meuyG3WSN/eG9H2UQ3m8yz+5WM/poT1fGh90Ps7NPLiceBXS tZcscTrsWjpVUZjodghULgwtMCWGU2xnse3Osi2iGN9vlgOSg4/T6c90TdhBL12OpI9s g6ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UrJNHhg4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h6-20020aa796c6000000b004fa3a8e006fsi14423015pfq.294.2022.04.05.23.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:16:28 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UrJNHhg4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1F98B181D90; Tue, 5 Apr 2022 23:08:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344960AbiDFB7Q (ORCPT + 99 others); Tue, 5 Apr 2022 21:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349175AbiDEJtY (ORCPT ); Tue, 5 Apr 2022 05:49:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50C07A18C; Tue, 5 Apr 2022 02:42:13 -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 ams.source.kernel.org (Postfix) with ESMTPS id 097CAB81B7F; Tue, 5 Apr 2022 09:42:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C718C385A2; Tue, 5 Apr 2022 09:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151730; bh=DpV3JuPp454N57ahgOEMS/xXClBVIEP1hRvicjNsFEA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UrJNHhg4Wm9b/tb+CAAYbtRUru2cvMRn1RVVI35ATzT48KfD21R0HV99zp9yBfKk4 +5hkLJXVY77ZChj17URyG4+adskvloBNenh1E9EcKlr2ArO+DtWn3yLPI/RsDRn/3k pJh0KPj30mWV8ghz4f+2rCiwbtEGZFK51a2/X3+w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , "Maciej W. Rozycki" , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.15 521/913] MIPS: Sanitise Cavium switch cases in TLB handler synthesizers Date: Tue, 5 Apr 2022 09:26:23 +0200 Message-Id: <20220405070355.470648463@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Maciej W. Rozycki [ Upstream commit 6ddcba9d480b6bcced4223a729794dfa6becb7eb ] It makes no sense to fall through to `break'. Therefore reorder the switch statements so as to have the Cavium cases first, followed by the default case, which improves readability and pacifies code analysis tools. No change in semantics, assembly produced is exactly the same. Reported-by: kernel test robot Signed-off-by: Maciej W. Rozycki Fixes: bc431d2153cc ("MIPS: Fix fall-through warnings for Clang") Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/mm/tlbex.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 9adad24c2e65..046d51a454af 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -2167,16 +2167,14 @@ static void build_r4000_tlb_load_handler(void) uasm_i_tlbr(&p); switch (current_cpu_type()) { - default: - if (cpu_has_mips_r2_exec_hazard) { - uasm_i_ehb(&p); - fallthrough; - case CPU_CAVIUM_OCTEON: case CPU_CAVIUM_OCTEON_PLUS: case CPU_CAVIUM_OCTEON2: - break; - } + break; + default: + if (cpu_has_mips_r2_exec_hazard) + uasm_i_ehb(&p); + break; } /* Examine entrylo 0 or 1 based on ptr. */ @@ -2243,15 +2241,14 @@ static void build_r4000_tlb_load_handler(void) uasm_i_tlbr(&p); switch (current_cpu_type()) { - default: - if (cpu_has_mips_r2_exec_hazard) { - uasm_i_ehb(&p); - case CPU_CAVIUM_OCTEON: case CPU_CAVIUM_OCTEON_PLUS: case CPU_CAVIUM_OCTEON2: - break; - } + break; + default: + if (cpu_has_mips_r2_exec_hazard) + uasm_i_ehb(&p); + break; } /* Examine entrylo 0 or 1 based on ptr. */ -- 2.34.1