Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12108599ybi; Fri, 26 Jul 2019 04:58:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqygVrxkLfMlGz39OJaNg+vjdny2lnrbB6/9LB1bptvDMPQqXCrqANsJUh8BoQqM+Hu+WwW3 X-Received: by 2002:a65:610a:: with SMTP id z10mr91267735pgu.178.1564142291990; Fri, 26 Jul 2019 04:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564142291; cv=none; d=google.com; s=arc-20160816; b=d2hJkgYluvQzAJERsgx0uHVDr7leB3SMiaxqs3JYsAUKZPUwMO2tBR3ggk20riERGT Rln2Xdp0fr9xR4YJuXwxENVXkDvw1bdNtxNegDK1c5hlrwfrm1mO/vz4aGV+8hgt3iP1 kOkHYRxz98l4KJvkiMvMSr5UtFDZ8sP2GwfHD2qqb0aH1loi5/IAFBasYfiE3oK9jwDP QA3ZmrpZ8d0wHTUcqXtZNRkbDSMqukhzUP4uKJ4PDvySqmjfP2UaFldCeR/VLYQFLhvr 5Wqj7y6lByjokYA/7OkNMAWi83FINCUGsR7DksY5vYhoKuhDTM74uRFoWvTZtah9FUom RHBw== 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:dkim-signature; bh=9OLH6fxuKgLOy3IQNpiLiTZEw036dSX/erXeaZiU+1g=; b=dO5Twv9/61Gkdg44WdunKkh2to0OVQIjpgjllYiPmCXDyRRW2294pFB9GZDavnTfB5 DRtl5PbzOatOuz1sCMWDQXuOPIXd2ctTLlMmHvhs1SYbOCZ0G255oCZ0E1rc5TWOC39P pIbqA2opSrQEutKTe47KLg1jZtGcNT9TIDsgZ3vors6P4LV7QNMTlLSTyCqHv/D3RvAA RYYOToVYUyMPjjAYEjzNvluLTVOaMNExOOuf28Wz2XEmrB68sENeOzuahfs59svrHQCe Q7lBBPLK7LwToVtvj+gS7d8grzOkb/OGJlyh4JXrHRS94fRSPlWnb9czNd6s6mcV3lbZ btpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aFmOhWcw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si19120357pfi.31.2019.07.26.04.57.56; Fri, 26 Jul 2019 04:58:11 -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; dkim=pass header.i=@linaro.org header.s=google header.b=aFmOhWcw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726965AbfGZL1o (ORCPT + 99 others); Fri, 26 Jul 2019 07:27:44 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43967 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfGZL1n (ORCPT ); Fri, 26 Jul 2019 07:27:43 -0400 Received: by mail-lj1-f193.google.com with SMTP id y17so26579660ljk.10 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=UG1T9fm+KiysndcX3cAdtXWHJWN1LrRKx6AnPSAffwsoRtEatg55kBRJ3Hh+vOgacf oWQkWOKnJhCQY+qES3Wh8ZLqPaj9kyj9TLrvOjGtw+gs9JdROYmZnzC1g0eyTEO6kL7K hkeYO2glOsp6vPK0C7oJNhoQoA3cASlGD8Wdt6oVUL+fWp3w3BtKAx+GZvBgw+p5MCiJ B1Cq+LzC+tBWcilT3FAeTFEYTKPgMDwCpEICPqQXwB+NEZsGDZWpH1rrlh8Hv1tJs+Z0 GBjjs0EET4HNZcDuJ8+IxSwdRZmQY+kgnipO3420QWA0pUdErLmv/5kjjR9vpppdpMDZ VJcw== X-Gm-Message-State: APjAAAUrDIgUfysLhugUT+bwwGEU9BnomEEMi2aukvyIZB55R1x60xfE OwDBA5YeOJAc6whC5zogHei1sA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell 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 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 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 --- 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; -- 2.20.1