From patchwork Fri Jul 26 11:27:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11060825 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 1D9F613AC for ; Fri, 26 Jul 2019 11:29:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CF0A28A75 for ; Fri, 26 Jul 2019 11:29:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0096028A8C; Fri, 26 Jul 2019 11:29:30 +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 9A79A28A75 for ; Fri, 26 Jul 2019 11:29:30 +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=2Zbm/mX2P1+syczLw0ULMwAjCQW5/FPSe7sLANacM4k=; b=qu99sTcUPHkUzb gFpo1KzVd0eBChHfzVU950PGjyp7uHBM0Q56XMTHB2PKRirrMbHVILWxbkdhkEyA0yYyWtTJ+sgTc vyJ35qpB0qdzDXC63WnAyyE/J9xIxsao2WI9h7eiSP6IrZUe9DUYeEvJyfVhq4YPHsZAXqJmmxauO Acg7HWEIaLihz8E4Ny9FyDI8bZGTiRbgg8yx/o52ZjKowx/idgT+1HVIoWMshbCqNCs1pyjcj7ws6 32YO4ALfa22pTvyYnqD8Fwfnv5FYQ90kAvqu2iGAF5RPbGwnSIeHngJbRLZ8P071fZJvAJ+EdrCca 4I7yV8cKzzhPmEU9bwMQ==; 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 1hqyPg-0003C8-Sa; Fri, 26 Jul 2019 11:29:29 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqyNz-0001sx-Ca for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2019 11:27:44 +0000 Received: by mail-lj1-x241.google.com with SMTP id p17so51154833ljg.1 for ; Fri, 26 Jul 2019 04:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9OLH6fxuKgLOy3IQNpiLiTZEw036dSX/erXeaZiU+1g=; b=aFmOhWcwR9JZPomPlhuEjiQ+iDEneB3Fn7cOkOKbodtgm6JD4c5v+z03CMnc9Z1qxk N5BYlfwLuDrPYCgVEx3uT5AJu0lXJ0ERfEsfhZesnJczUQcmNVsgebr6Ip3WG9BeVgwT bhCer7qih/avaGN3NiV+P8ETiX3PBCjSocV402MD4r7vy4Mi73g9fagGvPdB2JtMOFEt WsTuzZ9t9fqOfCp5llHvN45J2SFvaESDfV1PoRj7h/LrkPxUJsgfIkZ+9b7g+XWoDhfn TL9as95m50nAnioG6EYMQZMj9cSITWohs2eXIEiiz2BGvN2Dj1b0Z16QjRT4Xo81Nrvz a45g== 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=9OLH6fxuKgLOy3IQNpiLiTZEw036dSX/erXeaZiU+1g=; b=KqfJtUBbcwKHsnLJMiqzUy/5srUmq9IXLcOTNRXqXO1un/3XwBPzcEbtEJGIodVy/p UEe7qxkRtDGgk4obLIyhBNDz2HXV3aJirdqjCfUb2TZ/pecXYT/Ibc0+FDp4OFCdDge+ ggVIs+2dNTQFyDSw0KSP1NOhobBZgVT+4QFQCBk1jQYSRgJZ3Emp0nvoCLXfLCz74EEm WtdnfR6uFchMx4cTCDr8hRuJf3xDIhJkxb/JzsZo8+5C8/o8V8e4/az8+vhewxEoOtdx Q6kp6V4dJuitn9z7Oq37Mo8bnTIk99oj3f+GvjJJwiiyEKhX20CrdDoyEntBU5VSWJ3F IT4g== X-Gm-Message-State: APjAAAXJseXGfoA1wh7vAyGRFQHHqVgAIFNfT2KJJ29fpVU9bVN0d/jD vznTw/AKYczVWjcQG/e+gUniyw== X-Google-Smtp-Source: APXvYqyLlEuVsq4S+ikz5rfIdN4QEBYo9a6hy0bII9lPMm8U6np7eGIUoQxz+vtDcvLauvKnwlRzhw== X-Received: by 2002:a2e:9250:: with SMTP id v16mr48826921ljg.89.1564140461541; Fri, 26 Jul 2019 04:27:41 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id w6sm8239195lff.80.2019.07.26.04.27.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:27:40 -0700 (PDT) From: Anders Roxell To: will@kernel.org, mark.rutland@arm.com Subject: [PATCH] arm_pmu: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:27:37 +0200 Message-Id: <20190726112737.19309-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190726_042743_474526_0D43C4E9 X-CRM114-Status: GOOD ( 10.89 ) 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: Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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 When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/perf/arm_pmu.c: In function ‘cpu_pm_pmu_notify’: ../drivers/perf/arm_pmu.c:726:3: warning: this statement may fall through [-Wimplicit-fallthrough=] cpu_pm_pmu_setup(armpmu, cmd); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/perf/arm_pmu.c:727:2: note: here case CPU_PM_ENTER_FAILED: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell Acked-by: Lorenzo Pieralisi Acked-by: Mark Rutland --- I'm not convinced that this is the correct patch to fix this issue. However, I can't see why we do 'armpmu->start(armpmu);' only in 'case CPU_PM_ENTER_FAILED' and why we not call function cpu_pm_pmu_setup() there also, since in cpu_pm_pmu_setup() has a case prepared for CPU_PM_ENTER_FAILED. drivers/perf/arm_pmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 2d06b8095a19..465a15705bab 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -724,6 +724,7 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd, break; case CPU_PM_EXIT: cpu_pm_pmu_setup(armpmu, cmd); + /* Fall through */ case CPU_PM_ENTER_FAILED: armpmu->start(armpmu); break;