Received: by 10.213.65.68 with SMTP id h4csp272786imn; Fri, 23 Mar 2018 04:27:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELuvEIksvGxUHnM2MYHg76bHm0Wa/gV9vH4sWiEJ1iv5XaUaTWOq/IQuq1jAXALy5iPo34gD X-Received: by 10.99.170.70 with SMTP id x6mr18627551pgo.114.1521804433542; Fri, 23 Mar 2018 04:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521804433; cv=none; d=google.com; s=arc-20160816; b=DnLNh10B1l20BkE5f2AbG/1CwzYes9HG3O7p7mr4SunFok01Zk4Q55HO++iI2LhtPJ AfBvlWgBCyv2Uxp393UEi84dY+RUVg/olwx+/Fqeqy3SdjpNStCATf54qytBMjkn3XYu cpaKWvYsAdPlm4ZIn6osIU5bQ0YBK9aTIzJrcmNPAPfY+UJFtgz4TtPa4hQ7dYQWeLZU nt2ApT0H09kr04ucK2OKoiIJ30pIWcArx8HzXFr1hZItGZWoU65VJwH/mByt7EWyeMb3 SIXznM3RfEchq1V5ktJmO7L2iysMxDaHIPNzWc5376tL4zEfwWaYYKNNgZxwpnfcevC9 BlFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gIEA1qQ+LxtR7ULVwdyncygG7Mg+8vbZUK3pH4vIGD8=; b=bqe7RxT1mJ6lJF4de7h5u93G25oTh+0EJ/erHpS2Pdc21QQcawhrUxGSpBnir4sfu1 qFqcWGD3ULW33h7BpYUprp/YrCbSaA9xJgwACal1hxg52c06qaKgpy+w16ceFCLvcyzO qWdzG17mD8fsNq7TclPARtJD8gYlK9XWdCbitE80L0R3C//qaLYzSNLeQzJ1P6D6Gv+P jw+Mzdyb+j0PYXo6Li4cUoq5BqgieSCB4WRskxky+bZhKPFbYWhuocjOBcjwlBZYcjmE Jec7zqRrNvxYVxxcHrTLWAWxsV3KOk6A+NK8TacQK6gaLaQiWFL0CvQ88W+S8K/2N1Zn A7oA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si7974139plk.576.2018.03.23.04.26.58; Fri, 23 Mar 2018 04:27:13 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932442AbeCWKHR (ORCPT + 99 others); Fri, 23 Mar 2018 06:07:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41144 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932395AbeCWKHP (ORCPT ); Fri, 23 Mar 2018 06:07:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B2191D35; Fri, 23 Mar 2018 10:07:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kuppuswamy Sathyanarayanan , Linus Walleij , Sasha Levin Subject: [PATCH 4.9 057/177] gpio: gpio-wcove: fix irq pending status bit width Date: Fri, 23 Mar 2018 10:53:05 +0100 Message-Id: <20180323094207.861957137@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094205.090519271@linuxfoundation.org> References: <20180323094205.090519271@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kuppuswamy Sathyanarayanan [ Upstream commit 7c2d176fe3f8dce632b948f79c7e89916ffe2c70 ] Whiskey cove PMIC has three GPIO banks with total number of 13 GPIO pins. But when checking for the pending status, for_each_set_bit() uses bit width of 7 and hence it only checks the status for first 7 GPIO pins missing to check/clear the status of rest of the GPIO pins. This patch fixes this issue. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-wcove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpio/gpio-wcove.c +++ b/drivers/gpio/gpio-wcove.c @@ -318,7 +318,7 @@ static irqreturn_t wcove_gpio_irq_handle while (pending) { /* One iteration is for all pending bits */ for_each_set_bit(gpio, (const unsigned long *)&pending, - GROUP0_NR_IRQS) { + WCOVE_GPIO_NUM) { offset = (gpio > GROUP0_NR_IRQS) ? 1 : 0; mask = (offset == 1) ? BIT(gpio - GROUP0_NR_IRQS) : BIT(gpio);