All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Sébastien SZYMANSKI" <sebastien.szymanski@armadeus.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	laurent.pinchart+renesas@ideasonboard.com,
	linux-input@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: Bug in i2c-core?
Date: Fri, 27 Feb 2015 09:01:07 -0800	[thread overview]
Message-ID: <20150227170107.GB6679@dtor-ws> (raw)
In-Reply-To: <20150227165944.GA6679@dtor-ws>

On Fri, Feb 27, 2015 at 08:59:44AM -0800, Dmitry Torokhov wrote:
> On Fri, Feb 27, 2015 at 12:09:51PM +0100, Sébastien SZYMANSKI wrote:
> > Hi,
> > 
> > I am writing an I2C touchscreen driver for an i.MX6 based board. I
> > compiled it as a module and when I unload it, I get the following warning:
> > 
> > # modprobe sx8654
> > [   46.261494] input: SX8654 I2C Touchscreen as
> > /devices/soc0/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-0048/input/input1
> > # rmmod sx8654
> > [   76.435223] ------------[ cut here ]------------
> > [   76.439909] WARNING: CPU: 0 PID: 134 at fs/proc/generic.c:552
> > remove_proc_entry+0x148/0x164()
> > [   76.448582] remove_proc_entry: removing non-empty directory
> > 'irq/208', leaking at least 'sx8654'
> 
> ...
> 
> > When I revert commit e4df3a0 (i2c: core: Dispose OF IRQ mapping at
> > client removal time) I don't get the warning.
> > 
> > Is this a bug in the i2c-core or am I doing something wrong in my driver?
> 
> Yes, this commit breaks all drivers using devm* for IRQ management on
> OF-based systemsi because devm* cleanup happens in device code, after
> bus's remove() method returns. I'd recommend reverting and finding a
> better way (making cleanup a custom devm action as well?).
> 

Also it seems that the original patch is incomplete as I do not see us
disposing the mapping when probe fails...

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: Bug in i2c-core?
Date: Fri, 27 Feb 2015 09:01:07 -0800	[thread overview]
Message-ID: <20150227170107.GB6679@dtor-ws> (raw)
In-Reply-To: <20150227165944.GA6679@dtor-ws>

On Fri, Feb 27, 2015 at 08:59:44AM -0800, Dmitry Torokhov wrote:
> On Fri, Feb 27, 2015 at 12:09:51PM +0100, S?bastien SZYMANSKI wrote:
> > Hi,
> > 
> > I am writing an I2C touchscreen driver for an i.MX6 based board. I
> > compiled it as a module and when I unload it, I get the following warning:
> > 
> > # modprobe sx8654
> > [   46.261494] input: SX8654 I2C Touchscreen as
> > /devices/soc0/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-0048/input/input1
> > # rmmod sx8654
> > [   76.435223] ------------[ cut here ]------------
> > [   76.439909] WARNING: CPU: 0 PID: 134 at fs/proc/generic.c:552
> > remove_proc_entry+0x148/0x164()
> > [   76.448582] remove_proc_entry: removing non-empty directory
> > 'irq/208', leaking at least 'sx8654'
> 
> ...
> 
> > When I revert commit e4df3a0 (i2c: core: Dispose OF IRQ mapping at
> > client removal time) I don't get the warning.
> > 
> > Is this a bug in the i2c-core or am I doing something wrong in my driver?
> 
> Yes, this commit breaks all drivers using devm* for IRQ management on
> OF-based systemsi because devm* cleanup happens in device code, after
> bus's remove() method returns. I'd recommend reverting and finding a
> better way (making cleanup a custom devm action as well?).
> 

Also it seems that the original patch is incomplete as I do not see us
disposing the mapping when probe fails...

-- 
Dmitry

  reply	other threads:[~2015-02-27 17:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 11:09 Bug in i2c-core? Sébastien SZYMANSKI
2015-02-27 11:09 ` Sébastien SZYMANSKI
2015-02-27 14:37 ` Thomas Petazzoni
2015-02-27 14:37   ` Thomas Petazzoni
2015-02-27 15:29   ` Dmitry Torokhov
2015-02-27 15:29     ` Dmitry Torokhov
2015-02-27 17:05     ` Uwe Kleine-König
2015-02-27 17:05       ` Uwe Kleine-König
2015-02-27 17:46       ` Dmitry Torokhov
2015-02-27 17:46         ` Dmitry Torokhov
2015-02-27 18:39         ` Uwe Kleine-König
2015-02-27 18:39           ` Uwe Kleine-König
2015-02-28 10:00           ` Thomas Petazzoni
2015-02-28 10:00             ` Thomas Petazzoni
     [not found] ` <54F0507F.6030804-d2DlULPkwbNWk0Htik3J/w@public.gmane.org>
2015-02-27 16:59   ` Dmitry Torokhov
2015-02-27 16:59     ` Dmitry Torokhov
2015-02-27 17:01     ` Dmitry Torokhov [this message]
2015-02-27 17:01       ` Dmitry Torokhov
2015-03-03 22:03     ` Laurent Pinchart
2015-03-03 22:03       ` Laurent Pinchart
2015-03-04  6:47       ` Wolfram Sang
2015-03-04  6:47         ` Wolfram Sang
2015-03-04  8:22       ` Wolfram Sang
2015-03-04  8:22         ` Wolfram Sang
2015-03-08  8:26         ` Wolfram Sang
2015-03-08  8:26           ` Wolfram Sang
2015-03-10  0:21           ` Laurent Pinchart
2015-03-10  0:21             ` Laurent Pinchart
2015-03-12  9:35             ` Wolfram Sang
2015-03-12  9:35               ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150227170107.GB6679@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=sebastien.szymanski@armadeus.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.