Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2731491ybi; Sun, 28 Jul 2019 16:28:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgg2AN5NMHtLmi8Y4E/fQiWDbg/WuTr95IxxTPPloq6q9RsLIaMrfOcrmYSYphoMxMRgCQ X-Received: by 2002:a63:f357:: with SMTP id t23mr49052837pgj.421.1564356490452; Sun, 28 Jul 2019 16:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564356490; cv=none; d=google.com; s=arc-20160816; b=fZrk1omL6+j4Wu8Zx1pESv9zBPO3Ws1YvrT4uP1xzHIKCk5eDX9oCiDVuGgdbFJKRq L8cCfShPaQU4s4DGm/jPfezJ528kW46ZfrUvcOFFdd6GRNKXyMyhaZ9Em0y1hfupRj95 4TWZ6P7gEYnME0CgUqs+q4MTo+geS8sB26pVzQHv4Xv0gIF5dUaETPgjakLf5x+DMxZd Vxtyq1KP/LBo+/dk+8Ug4ed9TmvLDr1UaziJf9QwDBT3LdbJ5q1+qSw/ZxOu4WeXkmVx fD5j5mN6KTu400q+dJyI1ZMqnW4DOme8L24P6zDv+zPz9KMoBEHm3GZXIAQmb4g7d2Nz zxNw== 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:mime-version :message-id:date:subject:cc:to:from; bh=CDFX7cmqBbGxd3S+PHtfPokRI/hCi8zxl2i1XDeVF5A=; b=j7zjDriz26YV0N5DB9sPiCrrsyue41x0sRrP85zxv1HuAIKAR/pkUlesexh4mZb7LW 8yWugM38JPN1USy8GZR6XHXQASwbJyHKrvko9mTTH93Xx2Y7u6Jx83XDUH4Ho8bM2Gdl 7IO6tweXPT4xP3DGyNno0Dw5aqIBCe7EjNeTWDtOCgqcENMXKr1Pr6kD3wWaiHti6Ui5 eF1heS0mGV/nYpihY1lGS9E86lzGhebAAHF+Dv2Uv7sjYUjjEafqPaUG9YdF7wQnJlMf 0jdzehmi7bZYL76Q0x85Dq4bEOfrLJRgPw1P3z3Rrf/eCOFs9KANdtXclFdIkQF789QI 1rXA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si1628866pgp.390.2019.07.28.16.27.55; Sun, 28 Jul 2019 16:28:10 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726229AbfG1X1Q (ORCPT + 99 others); Sun, 28 Jul 2019 19:27:16 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35622 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfG1X1Q (ORCPT ); Sun, 28 Jul 2019 19:27:16 -0400 Received: by mail-wr1-f68.google.com with SMTP id y4so59805734wrm.2 for ; Sun, 28 Jul 2019 16:27:14 -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=fkelgX8XdoxtvqYoZfAkpP78GBVlTDxpHl/XJ4o/w5fjEfhJM7LPQ9Q2N9KZk15hTD 485XTcpoecD5tBuVSZvXhyehJYJnkSaO7ANtU7G7wsaORab0IWOoB3hIQjp+snQUvbcO PQEqICXCUtPsHCe5SSbNV433skUM+MbIX28tDLNLVJIyhpFk14nQFe/VGiOoj7l9jJ9o rxZwYM5XAZH/UAsgEypdE4CJyOkiglv3G+6nryECF5d5xfh2D6O1wAHr1nSLKDOeEL6J WxQZaq7NkHGFE/4LpsZXmbbfCaYC+aFyPkiDC2I6eHvw3EqVQqNVr6zjeSIZ+6UDuX5W 7jwQ== X-Gm-Message-State: APjAAAVUUeKXBMXnVVe4ZqIih+IF6TjRJrna1jW70riqrLvTQeU6VQRA K0qClRTSoZ2qVSuif9PVA+eHaKj2k98= 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 Cc: Mark Rutland , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.21.0