From patchwork Tue Apr 26 09:20:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 8936971 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DDE879F1C1 for ; Tue, 26 Apr 2016 09:20:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BBCF2014A for ; Tue, 26 Apr 2016 09:20:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5390F20123 for ; Tue, 26 Apr 2016 09:20:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751890AbcDZJUa (ORCPT ); Tue, 26 Apr 2016 05:20:30 -0400 Received: from mail-oi0-f51.google.com ([209.85.218.51]:35532 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbcDZJU0 (ORCPT ); Tue, 26 Apr 2016 05:20:26 -0400 Received: by mail-oi0-f51.google.com with SMTP id x19so8634463oix.2 for ; Tue, 26 Apr 2016 02:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=OigHN0jchlrozKky0uIuvX651W0ZsVIu0b20osUG8ds=; b=WuoIQXJ4xWtZpFO4/TfgJl5QFDD4Tgx8yShfDqBK3nsbgejipKM0yGNxBmpsorVbiR AM1aWFaCaf6vxrX0AqVoPxcVqh/cNqD51xJzhoITSepUJlqlrNYxHYzQZ5a9OypWFXpA whokOeYYUpqmT2r0outfNwlXBtGvDZfkw7gBA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=OigHN0jchlrozKky0uIuvX651W0ZsVIu0b20osUG8ds=; b=RXAR9kpJLmPd2JX8d5bZpmMFuMmkdAe95fAS0q8Mva/hDp1Q2XXim3VnLB6nruI8/t kMmmUXOZD+OkkMm/97KWByv/ShKkdT5Rpooyx0U8Y9MwbSwjOA7Vlg5d8JnlfdnIyM2d jtN3HnmDTHBhPC25fB58FVYKTiZYUD1G2BcpJ9Z2jZbybe7zI5eM7g1cTAcV8ObRtmHz LrH1LdzoMF3luOimqi+LppiHyJowb5esfv0LdopAerrCukc1XXAMT8btHWOsYI9n7rDR Fc/bQstyudSy9YWX1NjtR3cDD/0t/h+shDCDRWv88PwlpDPwmUJ5JXg4Mg8SZ3uventb RRDg== X-Gm-Message-State: AOPr4FWDYvL4IsneqjXTVRecATxoKHwOjwrRYi3AnTCHHD6WSE4HSgVHgPEVyjI+GmP7LcB2KYwXnS58JBAT9NzQ MIME-Version: 1.0 X-Received: by 10.202.74.17 with SMTP id x17mr451152oia.143.1461662425807; Tue, 26 Apr 2016 02:20:25 -0700 (PDT) Received: by 10.182.176.104 with HTTP; Tue, 26 Apr 2016 02:20:25 -0700 (PDT) In-Reply-To: <571DE43D.3020308@jinso.co.jp> References: <56FE29DC.4060605@jinso.co.jp> <571DE43D.3020308@jinso.co.jp> Date: Tue, 26 Apr 2016 11:20:25 +0200 Message-ID: Subject: Re: [Bug]:LAGER: GPIO-KEYS: Warning occurs after unbinding the e6051000.gpio From: Linus Walleij To: Cao Minh Hiep Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven , Yoshihiro Shimoda , Magnus Damm , Sakato Ryusuke , kuninori morimoto , Nguyen Viet Dung , LE MINH DUC , =?UTF-8?B?56iy5ZCJ77ya5Lq644K9?= , "M.Miura" Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Apr 25, 2016 at 11:32 AM, Cao Minh Hiep wrote: > Hello Linus Walleij-san > > We have tested Linux upstream v4.6-rc2 on Renesas's Lager board. > When we tried to unbind the e6051000.gpio, the following warning messages > occurs: > > "root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar# echo e6051000.gpio > > unbind > [ 241.511034] ------------[ cut here ]------------ > [ 241.525054] WARNING: CPU: 0 PID: 2104 at fs/proc/generic.c:575 > remove_proc_entry+0x13c/0x160 > [ 241.550456] remove_proc_entry: removing non-empty directory 'irq/169', > leaking at least '6-0039' Do you mean that you set up a handler in userspace, using the deprecated sysfs ABI and then unbind the module providing the IRQ resource? > And we found a patch between v4.5 and v4.6-rc2 that causing of this issue. > The patch is "ff2b1359 gpio: make the gpiochip a real device" It seems the issue is not a bug in the kernel, the issue is that the kernel is warning you about something that was wrong also before but you didn't get a warning for it until now. It is not OK to unbind a driver providing IRQs. It is even unclear if we should even allow modules to provide IRQs because there is no way to handle irqchips going away when it has consumers. Maybe we should just do this? Yours, Linus Walleij diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 3fe8e773d95c..ae5e81358ec5 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -562,6 +562,7 @@ static struct platform_driver gpio_rcar_device_driver = { .driver = { .name = "gpio_rcar", .of_match_table = of_match_ptr(gpio_rcar_of_table), + .suppress_bind_attrs = true, } };