Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1433081pxu; Fri, 16 Oct 2020 11:49:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP/6rStTfXrzrZ9Jy2DLXgOU/CWVES5mcI46EcfNhwoaF5AK0yQQugnfO17Zq7qd40X7tj X-Received: by 2002:a17:906:f90a:: with SMTP id lc10mr5341771ejb.272.1602874150348; Fri, 16 Oct 2020 11:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602874150; cv=none; d=google.com; s=arc-20160816; b=Hnab+0pHcBZrnPy7phSZSTf2ung9y6YYxdJYOf+EXh5HzyA3rYy2zhFwv5Ct/T1CZh IUm9mXseB4pvE1YLjav27IAocPND8ItyUvqMFUBzp08YoYi6rvcGl3ZCqP17VRAGACoA iGLZtqPxIdGekw1VCXrKzy6TQYLiJ17jR0jqeSJVIbKkWPtRNJIrsJSMoC3oOWE9dSzf JjHDa5rE1wIIRbuHKRZ8dOluqgeg5YSH0pIrAg3GLLXAIaThXwO8VjQw8dqqB7UwC5Nv 5bRoqKHflrG8qxFTEijVNapkHEddbuDTKmmXSaKHufZclFP9KNHS5cGkKZ/DTJkK11pA TYDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=rzFEh46A7E13JsZX9JSJnB7PvdLnCfkF5aDoCQT+Myg=; b=J+m3kaafl/j4RffkzJe677IG7n7C/A4rQ/9w5RVtYE1+1CLT1LBlQq3bNrWggYjtVM HXtgz+S7VoBbNbyAV4k998F0FVKmCjU1G0YVtyZ7yt7YN1ZzZ9uhg8iiop2fmAE0Ya1V 1jxJntbSYXqkfOHi76c9zIgk52RwQIZuGg5bfoOArc4ho23AiPPP3j1c1e6PefpFmQjp SUSpW7+aXb6qfV2JDVoHbBlGDIKToOkDg6EFvZ3i/HHFD5SmL7oKug8kWtT93nMGhJp7 P9wQH2KuWg1+aRqolpIJeMeGFodz+/0/2sVKZ4cjYQYO+rMvqDvjcFlZGhbwICAvCgNH HvKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si2320623edg.229.2020.10.16.11.48.48; Fri, 16 Oct 2020 11:49:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410216AbgJPPg4 (ORCPT + 99 others); Fri, 16 Oct 2020 11:36:56 -0400 Received: from foss.arm.com ([217.140.110.172]:39846 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408384AbgJPPg4 (ORCPT ); Fri, 16 Oct 2020 11:36:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5F05C13D5; Fri, 16 Oct 2020 08:36:55 -0700 (PDT) Received: from entos-thunderx2-02.shanghai.arm.com (entos-thunderx2-02.shanghai.arm.com [10.169.212.213]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B8D373F719; Fri, 16 Oct 2020 08:36:52 -0700 (PDT) From: Jia He To: Hoan Tran , Serge Semin , Linus Walleij , Bartosz Golaszewski Cc: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Jia He Subject: [PATCH] gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip Date: Fri, 16 Oct 2020 23:35:44 +0800 Message-Id: <20201016153544.162611-1-justin.he@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") missed the case in dwapb_irq_set_wake(). Without this fix, probing the dwapb gpio driver will hit a error: "address between user and kernel address ranges" on a Ampere armv8a server and cause a panic. Fixes: 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") Signed-off-by: Jia He --- drivers/gpio/gpio-dwapb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index a5b326754124..2a9046c0fb16 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -343,8 +343,8 @@ static int dwapb_irq_set_type(struct irq_data *d, u32 type) #ifdef CONFIG_PM_SLEEP static int dwapb_irq_set_wake(struct irq_data *d, unsigned int enable) { - struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d); - struct dwapb_gpio *gpio = igc->private; + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); + struct dwapb_gpio *gpio = to_dwapb_gpio(gc); struct dwapb_context *ctx = gpio->ports[0].ctx; irq_hw_number_t bit = irqd_to_hwirq(d); -- 2.17.1