* [patch 0/2] MTD: use list_for_each_entry()
@ 2008-05-31 13:28 matthias
2008-05-31 13:28 ` [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() matthias
2008-05-31 13:28 ` [patch 2/2] MTD: use list_for_each_entry() in del_mtd_device() matthias
0 siblings, 2 replies; 8+ messages in thread
From: matthias @ 2008-05-31 13:28 UTC (permalink / raw)
To: dwmw2, linux-mtd; +Cc: linux-kernel, akpm
MTD: Use list_for_each_entry() instead of list_for_each() in add_mtd_device() and del_mtd_device()
--
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona
We build too many walls and not enough bridges
(Isaac Newton)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
^ permalink raw reply [flat|nested] 8+ messages in thread* [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() 2008-05-31 13:28 [patch 0/2] MTD: use list_for_each_entry() matthias @ 2008-05-31 13:28 ` matthias 2008-05-31 13:35 ` Matthias Kaehlcke 2008-06-04 16:34 ` David Woodhouse 2008-05-31 13:28 ` [patch 2/2] MTD: use list_for_each_entry() in del_mtd_device() matthias 1 sibling, 2 replies; 8+ messages in thread From: matthias @ 2008-05-31 13:28 UTC (permalink / raw) To: dwmw2, linux-mtd; +Cc: linux-kernel, akpm, Matthias Kaehlcke [-- Attachment #1: mtd-add_mtd_device-use-list_for_each_entry.patch --] [-- Type: text/plain, Size: 1422 bytes --] MTD: use list_for_each_entry() instead of list_for_each() in add_mtd_device() Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Index: linux-2.6/drivers/mtd/mtdcore.c =================================================================== --- linux-2.6.orig/drivers/mtd/mtdcore.c 2008-05-31 14:46:00.000000000 +0200 +++ linux-2.6/drivers/mtd/mtdcore.c 2008-05-31 14:46:20.000000000 +0200 @@ -53,7 +53,7 @@ for (i=0; i < MAX_MTD_DEVICES; i++) if (!mtd_table[i]) { - struct list_head *this; + struct mtd_notifier *not mtd_table[i] = mtd; mtd->index = i; @@ -72,8 +72,7 @@ DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name); /* No need to get a refcount on the module containing the notifier, since we hold the mtd_table_mutex */ - list_for_each(this, &mtd_notifiers) { - struct mtd_notifier *not = list_entry(this, struct mtd_notifier, list); + list_for_each_entry(not, &mtd_notifiers, list) { not->add(mtd); } -- Matthias Kaehlcke Embedded Linux Engineer Barcelona We build too many walls and not enough bridges (Isaac Newton) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() 2008-05-31 13:28 ` [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() matthias @ 2008-05-31 13:35 ` Matthias Kaehlcke 2008-05-31 19:41 ` Jörn Engel 2008-06-04 16:34 ` David Woodhouse 1 sibling, 1 reply; 8+ messages in thread From: Matthias Kaehlcke @ 2008-05-31 13:35 UTC (permalink / raw) To: dwmw2, linux-mtd; +Cc: linux-kernel, akpm sorry, i forgot to tell quilt to refresh the patch, here comes the good one -- MTD: use list_for_each_entry() instead of list_for_each() in add_mtd_device() Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Index: linux-2.6/drivers/mtd/mtdcore.c =================================================================== --- linux-2.6.orig/drivers/mtd/mtdcore.c 2008-05-31 15:31:17.000000000 +0200 +++ linux-2.6/drivers/mtd/mtdcore.c 2008-05-31 15:32:19.000000000 +0200 @@ -53,7 +53,7 @@ for (i=0; i < MAX_MTD_DEVICES; i++) if (!mtd_table[i]) { - struct list_head *this; + struct mtd_notifier *not; mtd_table[i] = mtd; mtd->index = i; @@ -72,8 +72,7 @@ DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name); /* No need to get a refcount on the module containing the notifier, since we hold the mtd_table_mutex */ - list_for_each(this, &mtd_notifiers) { - struct mtd_notifier *not = list_entry(this, struct mtd_notifier, list); + list_for_each_entry(not, &mtd_notifiers, list) { not->add(mtd); } -- Matthias Kaehlcke Embedded Linux Engineer Barcelona I am incapable of conceiving infinity, and yet I do not accept finity (Simone de Beauvoir) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() 2008-05-31 13:35 ` Matthias Kaehlcke @ 2008-05-31 19:41 ` Jörn Engel 2008-06-01 5:09 ` Matthias Kaehlcke 0 siblings, 1 reply; 8+ messages in thread From: Jörn Engel @ 2008-05-31 19:41 UTC (permalink / raw) To: Matthias Kaehlcke; +Cc: dwmw2, linux-mtd, akpm, linux-kernel, Chris Malley On Sat, 31 May 2008 15:35:11 +0200, Matthias Kaehlcke wrote: > > MTD: use list_for_each_entry() instead of list_for_each() in add_mtd_device() > > Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Chris Malley (added to Cc:) sent a patch converting all of drivers/mtd/ in a similar fashion. It should be on its way in, if dwmw2 hasn't missed it. You might also want to check your mailer. This patch looks like bouquet of flowers that got stuck in an elevator door. ;) > Index: linux-2.6/drivers/mtd/mtdcore.c > =================================================================== > --- linux-2.6.orig/drivers/mtd/mtdcore.c 2008-05-31 > 15:31:17.000000000 +0200 > +++ linux-2.6/drivers/mtd/mtdcore.c 2008-05-31 15:32:19.000000000 > +0200 > @@ -53,7 +53,7 @@ > > for (i=0; i < MAX_MTD_DEVICES; i++) > if (!mtd_table[i]) { > - struct list_head *this; > + struct mtd_notifier *not; > > mtd_table[i] = mtd; > mtd->index = i; > @@ -72,8 +72,7 @@ > DEBUG(0, "mtd: Giving out device %d to > %s\n",i, mtd->name); > /* No need to get a refcount on the module > containing > the notifier, since we hold the > mtd_table_mutex */ > - list_for_each(this, &mtd_notifiers) { > - struct mtd_notifier *not = > list_entry(this, struct mtd_notifier, list); > + list_for_each_entry(not, &mtd_notifiers, list) > { > not->add(mtd); > } Jörn -- You ain't got no problem, Jules. I'm on the motherfucker. Go back in there, chill them niggers out and wait for the Wolf, who should be coming directly. -- Marsellus Wallace ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() 2008-05-31 19:41 ` Jörn Engel @ 2008-06-01 5:09 ` Matthias Kaehlcke 0 siblings, 0 replies; 8+ messages in thread From: Matthias Kaehlcke @ 2008-06-01 5:09 UTC (permalink / raw) To: Jörn Engel; +Cc: dwmw2, linux-mtd, akpm, linux-kernel, Chris Malley El Sat, May 31, 2008 at 09:41:55PM +0200 Jörn Engel ha dit: > On Sat, 31 May 2008 15:35:11 +0200, Matthias Kaehlcke wrote: > > > > MTD: use list_for_each_entry() instead of list_for_each() in add_mtd_device() > > > > Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> > > Chris Malley (added to Cc:) sent a patch converting all of drivers/mtd/ > in a similar fashion. It should be on its way in, if dwmw2 hasn't > missed it. fine :) > You might also want to check your mailer. This patch looks like bouquet > of flowers that got stuck in an elevator door. ;) thanks for the pointer. normally my mutt/emacs config doesn't cause this type of problems, i suppose i screwed it up myself somehow ... -- Matthias Kaehlcke Embedded Linux Engineer Barcelona The book of nature is written in the language of mathematics (Galileo Galilei) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() 2008-05-31 13:28 ` [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() matthias 2008-05-31 13:35 ` Matthias Kaehlcke @ 2008-06-04 16:34 ` David Woodhouse 2008-06-04 16:38 ` Matthias Kaehlcke 1 sibling, 1 reply; 8+ messages in thread From: David Woodhouse @ 2008-06-04 16:34 UTC (permalink / raw) To: matthias; +Cc: linux-mtd, linux-kernel, akpm On Sat, 2008-05-31 at 15:28 +0200, matthias@kaehlcke.net wrote: > - struct list_head *this; > + struct mtd_notifier *not That's not even going to compile, surely? -- dwmw2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() 2008-06-04 16:34 ` David Woodhouse @ 2008-06-04 16:38 ` Matthias Kaehlcke 0 siblings, 0 replies; 8+ messages in thread From: Matthias Kaehlcke @ 2008-06-04 16:38 UTC (permalink / raw) To: David Woodhouse; +Cc: linux-mtd, linux-kernel, akpm El Wed, Jun 04, 2008 at 05:34:08PM +0100 David Woodhouse ha dit: > On Sat, 2008-05-31 at 15:28 +0200, matthias@kaehlcke.net wrote: > > - struct list_head *this; > > + struct mtd_notifier *not > > That's not even going to compile, surely? i forgot to tell quilt to refresh the patch before sending it. i sent a fix just some minutes after the broken patch -- Matthias Kaehlcke Embedded Linux Engineer Barcelona La libertad es como la mañana. Hay quienes esperan dormidos a que llegue, pero hay quienes desvelan y caminan la noche para alcanzarla (Subcomandante Marcos) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- ^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 2/2] MTD: use list_for_each_entry() in del_mtd_device() 2008-05-31 13:28 [patch 0/2] MTD: use list_for_each_entry() matthias 2008-05-31 13:28 ` [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() matthias @ 2008-05-31 13:28 ` matthias 1 sibling, 0 replies; 8+ messages in thread From: matthias @ 2008-05-31 13:28 UTC (permalink / raw) To: dwmw2, linux-mtd; +Cc: linux-kernel, akpm, Matthias Kaehlcke [-- Attachment #1: mtd-del_mtd_device-use-list_for_each_entry.patch --] [-- Type: text/plain, Size: 1308 bytes --] MTD: use list_for_each_entry() instead of list_for_each() in del_mtd_device() Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Index: linux-2.6/drivers/mtd/mtdcore.c =================================================================== --- linux-2.6.orig/drivers/mtd/mtdcore.c 2008-05-31 15:18:13.000000000 +0200 +++ linux-2.6/drivers/mtd/mtdcore.c 2008-05-31 15:21:04.000000000 +0200 @@ -112,12 +112,11 @@ mtd->index, mtd->name, mtd->usecount); ret = -EBUSY; } else { - struct list_head *this; + struct mtd_notifier *not; /* No need to get a refcount on the module containing the notifier, since we hold the mtd_table_mutex */ - list_for_each(this, &mtd_notifiers) { - struct mtd_notifier *not = list_entry(this, struct mtd_notifier, list); + list_for_each_entry(not, &mtd_notifiers, list) { not->remove(mtd); } -- Matthias Kaehlcke Embedded Linux Engineer Barcelona We build too many walls and not enough bridges (Isaac Newton) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-04 16:38 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-05-31 13:28 [patch 0/2] MTD: use list_for_each_entry() matthias 2008-05-31 13:28 ` [patch 1/2] MTD: use list_for_each_entry() in add_mtd_device() matthias 2008-05-31 13:35 ` Matthias Kaehlcke 2008-05-31 19:41 ` Jörn Engel 2008-06-01 5:09 ` Matthias Kaehlcke 2008-06-04 16:34 ` David Woodhouse 2008-06-04 16:38 ` Matthias Kaehlcke 2008-05-31 13:28 ` [patch 2/2] MTD: use list_for_each_entry() in del_mtd_device() matthias
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox