From patchwork Fri Jul 26 11:28:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 169822 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12909631ilk; Fri, 26 Jul 2019 04:28:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFmOqc0As1uGx3gqy2ggfqqMMYgVJfzXlQwp2vOjxY4zab9XdWCCWiAPNbHgpf3ZWheFa6 X-Received: by 2002:a17:902:aa03:: with SMTP id be3mr95535733plb.240.1564140504746; Fri, 26 Jul 2019 04:28:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564140504; cv=none; d=google.com; s=arc-20160816; b=HdiQTLeRsOyG4TPYRRHv0oR8aBAsY/EQkeZNOmio82wmqt/475oo9f3Xq2fg9JFGIr 78KyMqgTBozP6gS2+a6w+GlqTKMR6U4JLKtGHBcD0gMGuRgaoUBaDCZBgn6qiB9jyZ01 tkGQUXokhyco4cihsy/FNoLYFiEnFs/NdjdibukcUImctM72qThmKDW723hlNX53NB/K v5fiw1gN/o470NTRl8T4q9OfolP/6pmIZP6fvc+U2Szq4CCOnfYMheraY/hPJk+VaN/H H22RbA0r5T3PJrybRpGPclnFcTY9l0Lrk1qs8jSmMObYEmMjnjYt/TdgYNRGCHAoRshz b9cA== 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=JRcrXtr8rQsCuSxKmOiTEHFaI3E2giu+b2+lAXm3fKY=; b=Rcppc0j35H0mhiqfOLz6WQhQJcWQLFtFrGadAsH0eJ1s8tDqxkjPRHlgqvYnuhXLvL fN1xlKLIxgRoNsoUu+31K//kWbrlefDWfTc4ZNaM4reH5qPlUCt1dF/tHPE9Dr/SYrbn sbZTFONGjq8pffKsETzWX7kXc9TWrQl2TaaJin50UfWCYaXp+2L7CCQAmGYTs9Q/0HIg A/Jg9LCPiSsYEdujooEHlx32s5ldjUeXURH7grIS6rvuhXlCvm9fwouuXpwDL1FI7Slh C5W/zkZMGVfN5v5OfZiRHxVmbKogN+79DF/ttkTlKdi7PX9uk+2SsBIoyjXLDrTplZzd KS0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rmXdZNRx; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 s6si18634212pgs.96.2019.07.26.04.28.24; Fri, 26 Jul 2019 04:28:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=rmXdZNRx; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S1726567AbfGZL2Y (ORCPT + 5 others); Fri, 26 Jul 2019 07:28:24 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:37031 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbfGZL2X (ORCPT ); Fri, 26 Jul 2019 07:28:23 -0400 Received: by mail-lj1-f195.google.com with SMTP id z28so51231547ljn.4 for ; Fri, 26 Jul 2019 04:28:22 -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=JRcrXtr8rQsCuSxKmOiTEHFaI3E2giu+b2+lAXm3fKY=; b=rmXdZNRx3HMv4Da1HMe0r5OGG9YW+88vz9KCNHfF0KRJaMPzwfuCgzrVVir9svuXdN uPE0v/CY1mZOEqzaatak8C0t3rgjVJUo24HtTqQ7cneYAMdRbqyPRKlV517gp78BtO+5 PmKtGqCX9jVyzQxYPZDWnqcwLJv6z8HpjExQw182ylQWndH4KiakesMiSrSqg2VcdG4o 08tYXWL1GMOZ8kPJGeAYYv/Ox8yFYLIP/glbVNFZcrbvF+oLyiuOxbbX3YozyyJ2mGnK UUaR/D3IOq24YoaHSShNyKhuW6Ol4PJ3H23k0RaelPe0Tz4IZK/boJlddC89xnVT4CdR m68w== 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=JRcrXtr8rQsCuSxKmOiTEHFaI3E2giu+b2+lAXm3fKY=; b=q/fnogvVZuo9A7L8cJe/bV7RTYF62lbuwYBRweToDETFppREqOm/iKSm6iIkAHYeDP Btsub8yUdhQvs/EPsuTgtu9s7ze/+CQk+62stZFuG9apErC8dshFH+m1U1YKwA35R1bX Ozo/gtnxnt7Govo1yMMOpcrDbB9cuiLIlJSXjPOBn/PjbhgPAxcArPTInWMnzfIikEDF DCFlZnRih8KjSGEvzX6Kmiv2YVXsdkHEIZ8GuAsDRA5j9twq+I5b3jLN+2IBY/XYPO7C diAAjV88SpmRFOaGprs8pATVS4C9ONeJhuNKW97ulyWz2xYA/qSbIuM59pkgJjmITnYL /3CA== X-Gm-Message-State: APjAAAXoiZ3YqSDWqWK20p87GPxMhIItEwTju+UHhL9Q2cYrT2MVHSNd 0PQ8WE6X2WyS5Hd986Z8Ls4dhg== X-Received: by 2002:a2e:25a:: with SMTP id 87mr49879332ljc.183.1564140501528; Fri, 26 Jul 2019 04:28:21 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id m25sm8267492lfc.83.2019.07.26.04.28.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:28:20 -0700 (PDT) From: Anders Roxell To: bjorn.andersson@linaro.org, agross@kernel.org, linus.walleij@linaro.org Cc: heiko@sntech.de, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH 2/2] pinctrl: qcom: spmi-gpio: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:28:16 +0200 Message-Id: <20190726112816.19723-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When fall-through warnings was enabled by default the following warnings was starting to show up: ../drivers/pinctrl/qcom/pinctrl-spmi-gpio.c: In function ‘pmic_gpio_populate’: ../drivers/pinctrl/qcom/pinctrl-spmi-gpio.c:815:20: warning: this statement may fall through [-Wimplicit-fallthrough=] pad->have_buffer = true; ~~~~~~~~~~~~~~~~~^~~~~~ ../drivers/pinctrl/qcom/pinctrl-spmi-gpio.c:816:2: note: here case PMIC_GPIO_SUBTYPE_GPIOC_4CH: ^~~~ ../drivers/pinctrl/qcom/pinctrl-spmi-gpio.c:820:20: warning: this statement may fall through [-Wimplicit-fallthrough=] pad->have_buffer = true; ~~~~~~~~~~~~~~~~~^~~~~~ ../drivers/pinctrl/qcom/pinctrl-spmi-gpio.c:821:2: note: here case PMIC_GPIO_SUBTYPE_GPIOC_8CH: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index f39da87ea185..ebf33f65c1bc 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -813,11 +813,13 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state, switch (subtype) { case PMIC_GPIO_SUBTYPE_GPIO_4CH: pad->have_buffer = true; + /* Fall through */ case PMIC_GPIO_SUBTYPE_GPIOC_4CH: pad->num_sources = 4; break; case PMIC_GPIO_SUBTYPE_GPIO_8CH: pad->have_buffer = true; + /* Fall through */ case PMIC_GPIO_SUBTYPE_GPIOC_8CH: pad->num_sources = 8; break;