From patchwork Fri Jan 11 14:17:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 1023590 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43blMQ5tgMz9sCs; Sat, 12 Jan 2019 01:18:10 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ghxdG-000576-QA; Fri, 11 Jan 2019 14:17:58 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1ghxdC-00056D-Qj for kernel-team@lists.ubuntu.com; Fri, 11 Jan 2019 14:17:54 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ghxdC-0008Ru-ID for kernel-team@lists.ubuntu.com; Fri, 11 Jan 2019 14:17:54 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/8] bcm2835-gpio-exp: Copy/paste error adding base twice Date: Fri, 11 Jan 2019 15:17:47 +0100 Message-Id: <1547216273-19433-3-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547216273-19433-1-git-send-email-paolo.pisati@canonical.com> References: <1547216273-19433-1-git-send-email-paolo.pisati@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Dave Stevenson BugLink: http://bugs.launchpad.net/bugs/1808366 brcmexp_gpio_set was adding gpio->gc.base to the offset twice, so passing an invalid number to the mailbox service. The firmware treated it modulo-8 anyway, but was logging an assert every time. Signed-off-by: Dave Stevenson (cherry picked from commit 8308f3f93b7360bda893c18801e22d62c1d61378 https://github.com/raspberrypi/linux rpi-4.9.y) Signed-off-by: Paolo Pisati --- drivers/gpio/gpio-bcm-exp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpio/gpio-bcm-exp.c b/drivers/gpio/gpio-bcm-exp.c index 681a914..d68adaf 100644 --- a/drivers/gpio/gpio-bcm-exp.c +++ b/drivers/gpio/gpio-bcm-exp.c @@ -165,8 +165,6 @@ static void brcmexp_gpio_set(struct gpio_chip *gc, unsigned int off, int val) gpio = container_of(gc, struct brcmexp_gpio, gc); - off += gpio->gc.base; - set.gpio = off + gpio->gc.base; /* GPIO to update */ set.state = val; /* Output state */