From patchwork Sun Jul 28 23:27:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matteo Croce X-Patchwork-Id: 11063103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA8D414DB for ; Sun, 28 Jul 2019 23:27:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 947B228717 for ; Sun, 28 Jul 2019 23:27:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82D19286DB; Sun, 28 Jul 2019 23:27:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 39089286DB for ; Sun, 28 Jul 2019 23:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tLMo8g2+xe0BaSu4d8N58ij/gPILFOiHgkRc3ujDe84=; b=Yij58mF54PgnNM w9elnSC3069zJLeStDRtfcuNVZbCbBt7piSPnJnj7qGwj3eyMul1CtbrCEn9SvM/5NGFcTUPEyAu8 U5r8MQeqmr3XVQalBcIDwfNTjbNmjsR8vup7seY6SD5YHNiC/XXOeV8lzBLECR+dXIAcoZIs8vZK6 AXtRG50q8+0AB8uE62eBUMeNAfAX1PpncXjf+ZzqFs6LB0WxG9P9YYk+U5QY1Tu7WYxDrG6uU4Q0n XOP3PQIH+IATEq1ouqZ/IXnxRteyGM9Nvj7PCizd1otLy/ChqdtXBhirWc63NS+JDAI28QoH0Ze4G YZDwStrBUJp626p5UGfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hrsZT-0003KK-80; Sun, 28 Jul 2019 23:27:19 +0000 Received: from mail-wr1-f66.google.com ([209.85.221.66]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hrsZP-0003Jz-Io for linux-arm-kernel@lists.infradead.org; Sun, 28 Jul 2019 23:27:16 +0000 Received: by mail-wr1-f66.google.com with SMTP id g17so59788219wrr.5 for ; Sun, 28 Jul 2019 16:27:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CDFX7cmqBbGxd3S+PHtfPokRI/hCi8zxl2i1XDeVF5A=; b=boeXrTSkPOvLh46PhmvUifcDwBr5LC2HFiK4hihtKt0B0lu7Q9G8bE24VH5MLJCu2M kmVdqvuDOdoSgMnsxHAuGkCW+ZicnxXWd3d9NpVUlUkYLFQtak/PvFmhrEGvAb5ZOLiL O+sESOKdm11s0fsWTsEItUpqMjblj57/PrBUFb6QYnNR9clcWbri9pbbB1FQIln3RA87 85LJ3dYsyt3WUc4GeYmv+MMVLD3Gq49CjNSq+rL92BMtyaho845Q/9snCsryEPpNK3Ze upUGdWL5McurVxhl1+aLdvdsa7jdN7jNS4/UxxV0Az7fV5j5pRf9FIEoSBYHtCernCtU e8OQ== X-Gm-Message-State: APjAAAWzdjciGxHreZt1k2XT5rjyRrsbIaV7SKTd6NKgZkLAlTOQdHWN go/Ejc8GCMUs0ZczliDqiggvX59QvEA= X-Google-Smtp-Source: APXvYqwbGg1c6DE/fHerM+Cvhn2kZX5UU+f9UqfzQyc2lvseyUAQVt6FWzZleWaiLpZ13cuB2B3vOg== X-Received: by 2002:a5d:4a49:: with SMTP id v9mr113674213wrs.44.1564356434100; Sun, 28 Jul 2019 16:27:14 -0700 (PDT) Received: from mcroce-redhat.homenet.telecomitalia.it (host221-208-dynamic.27-79-r.retail.telecomitalia.it. [79.27.208.221]) by smtp.gmail.com with ESMTPSA id t6sm65373267wmb.29.2019.07.28.16.27.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 16:27:13 -0700 (PDT) From: Matteo Croce To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: hw_breakpoint: mark expected switch fall-through Date: Mon, 29 Jul 2019 01:27:06 +0200 Message-Id: <20190728232706.7396-1-mcroce@redhat.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190728_162715_631831_0D8B0943 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Mark switch cases where we are expecting to fall through, fixes the following warning: CC arch/arm64/kernel/hw_breakpoint.o arch/arm64/kernel/hw_breakpoint.c: In function ‘hw_breakpoint_arch_parse’: arch/arm64/kernel/hw_breakpoint.c:540:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) ^ arch/arm64/kernel/hw_breakpoint.c:542:3: note: here case 2: ^~~~ arch/arm64/kernel/hw_breakpoint.c:544:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) ^ arch/arm64/kernel/hw_breakpoint.c:546:3: note: here default: ^~~~~~~ Signed-off-by: Matteo Croce --- arch/arm64/kernel/hw_breakpoint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index dceb84520948..7d846985b133 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -539,10 +539,12 @@ int hw_breakpoint_arch_parse(struct perf_event *bp, /* Allow single byte watchpoint. */ if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) break; + /* fallthrough */ case 2: /* Allow halfword watchpoints and breakpoints. */ if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) break; + /* fallthrough */ default: return -EINVAL; }