* [PATCH] arm: omap: hwmod: drop unnecessary list initialization
@ 2014-07-15 20:18 Felipe Balbi
2014-07-28 5:24 ` Paul Walmsley
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2014-07-15 20:18 UTC (permalink / raw)
To: linux-arm-kernel
ml->node and sl->node are currently initialized
by means of INIT_LIST_HEAD(). That initialiation
is followed by a list_add() call.
Looking at what both these functions do we will have:
ml->node.next = &ml->node;
ml->node.prev = &ml->node;
oi->master->master_ports.next.prev = &ml->node;
ml->node.next = &oi->master->master_ports.next;
ml->node.prev = &oi->master->master_ports;
oi->master->master_ports.next = &ml->node;
from this, it's clear that both INIT_LIST_HEAD() calls
are unnecessary and can be safely removed.
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
found by code inspection, boot tested on am437x SK on today's
linux-next + pending patches.
arch/arm/mach-omap2/omap_hwmod.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6c074f3..8194990 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2828,12 +2828,10 @@ static int __init _add_link(struct omap_hwmod_ocp_if *oi)
_alloc_links(&ml, &sl);
ml->ocp_if = oi;
- INIT_LIST_HEAD(&ml->node);
list_add(&ml->node, &oi->master->master_ports);
oi->master->masters_cnt++;
sl->ocp_if = oi;
- INIT_LIST_HEAD(&sl->node);
list_add(&sl->node, &oi->slave->slave_ports);
oi->slave->slaves_cnt++;
--
2.0.1.563.g66f467c
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] arm: omap: hwmod: drop unnecessary list initialization
2014-07-15 20:18 [PATCH] arm: omap: hwmod: drop unnecessary list initialization Felipe Balbi
@ 2014-07-28 5:24 ` Paul Walmsley
2014-11-04 5:39 ` Felipe Balbi
0 siblings, 1 reply; 5+ messages in thread
From: Paul Walmsley @ 2014-07-28 5:24 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 15 Jul 2014, Felipe Balbi wrote:
> ml->node and sl->node are currently initialized
> by means of INIT_LIST_HEAD(). That initialiation
> is followed by a list_add() call.
>
> Looking at what both these functions do we will have:
>
> ml->node.next = &ml->node;
> ml->node.prev = &ml->node;
> oi->master->master_ports.next.prev = &ml->node;
> ml->node.next = &oi->master->master_ports.next;
> ml->node.prev = &oi->master->master_ports;
> oi->master->master_ports.next = &ml->node;
>
> from this, it's clear that both INIT_LIST_HEAD() calls
> are unnecessary and can be safely removed.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>
> found by code inspection, boot tested on am437x SK on today's
> linux-next + pending patches.
Thanks, queued for v3.18.
- Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] arm: omap: hwmod: drop unnecessary list initialization
2014-07-28 5:24 ` Paul Walmsley
@ 2014-11-04 5:39 ` Felipe Balbi
2014-11-06 16:19 ` Felipe Balbi
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2014-11-04 5:39 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Mon, Jul 28, 2014 at 05:24:34AM +0000, Paul Walmsley wrote:
> On Tue, 15 Jul 2014, Felipe Balbi wrote:
>
> > ml->node and sl->node are currently initialized
> > by means of INIT_LIST_HEAD(). That initialiation
> > is followed by a list_add() call.
> >
> > Looking at what both these functions do we will have:
> >
> > ml->node.next = &ml->node;
> > ml->node.prev = &ml->node;
> > oi->master->master_ports.next.prev = &ml->node;
> > ml->node.next = &oi->master->master_ports.next;
> > ml->node.prev = &oi->master->master_ports;
> > oi->master->master_ports.next = &ml->node;
> >
> > from this, it's clear that both INIT_LIST_HEAD() calls
> > are unnecessary and can be safely removed.
> >
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> >
> > found by code inspection, boot tested on am437x SK on today's
> > linux-next + pending patches.
>
> Thanks, queued for v3.18.
This is not on v3.18, what happened ?
$ git log --author=balbi at ti.com linus/master ^v3.17 -- arch/arm/mach-omap2/omap_hwmod.c
$
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141103/355af47a/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] arm: omap: hwmod: drop unnecessary list initialization
2014-11-04 5:39 ` Felipe Balbi
@ 2014-11-06 16:19 ` Felipe Balbi
2014-11-07 14:09 ` Paul Walmsley
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2014-11-06 16:19 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 03, 2014 at 11:39:52PM -0600, Felipe Balbi wrote:
> Hi,
>
> On Mon, Jul 28, 2014 at 05:24:34AM +0000, Paul Walmsley wrote:
> > On Tue, 15 Jul 2014, Felipe Balbi wrote:
> >
> > > ml->node and sl->node are currently initialized
> > > by means of INIT_LIST_HEAD(). That initialiation
> > > is followed by a list_add() call.
> > >
> > > Looking at what both these functions do we will have:
> > >
> > > ml->node.next = &ml->node;
> > > ml->node.prev = &ml->node;
> > > oi->master->master_ports.next.prev = &ml->node;
> > > ml->node.next = &oi->master->master_ports.next;
> > > ml->node.prev = &oi->master->master_ports;
> > > oi->master->master_ports.next = &ml->node;
> > >
> > > from this, it's clear that both INIT_LIST_HEAD() calls
> > > are unnecessary and can be safely removed.
> > >
> > > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > > ---
> > >
> > > found by code inspection, boot tested on am437x SK on today's
> > > linux-next + pending patches.
> >
> > Thanks, queued for v3.18.
>
> This is not on v3.18, what happened ?
>
> $ git log --author=balbi at ti.com linus/master ^v3.17 -- arch/arm/mach-omap2/omap_hwmod.c
> $
ping
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141106/b77efa88/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] arm: omap: hwmod: drop unnecessary list initialization
2014-11-06 16:19 ` Felipe Balbi
@ 2014-11-07 14:09 ` Paul Walmsley
0 siblings, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2014-11-07 14:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi
On Thu, 6 Nov 2014, Felipe Balbi wrote:
> On Mon, Nov 03, 2014 at 11:39:52PM -0600, Felipe Balbi wrote:
> > Hi,
> >
> > On Mon, Jul 28, 2014 at 05:24:34AM +0000, Paul Walmsley wrote:
> > > On Tue, 15 Jul 2014, Felipe Balbi wrote:
> > >
> > > > ml->node and sl->node are currently initialized
> > > > by means of INIT_LIST_HEAD(). That initialiation
> > > > is followed by a list_add() call.
> > > >
> > > > Looking at what both these functions do we will have:
> > > >
> > > > ml->node.next = &ml->node;
> > > > ml->node.prev = &ml->node;
> > > > oi->master->master_ports.next.prev = &ml->node;
> > > > ml->node.next = &oi->master->master_ports.next;
> > > > ml->node.prev = &oi->master->master_ports;
> > > > oi->master->master_ports.next = &ml->node;
> > > >
> > > > from this, it's clear that both INIT_LIST_HEAD() calls
> > > > are unnecessary and can be safely removed.
> > > >
> > > > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > > > ---
> > > >
> > > > found by code inspection, boot tested on am437x SK on today's
> > > > linux-next + pending patches.
> > >
> > > Thanks, queued for v3.18.
> >
> > This is not on v3.18, what happened ?
> >
> > $ git log --author=balbi at ti.com linus/master ^v3.17 -- arch/arm/mach-omap2/omap_hwmod.c
> > $
>
> ping
I wound up not sending any OMAP patches upstream for the v3.18 merge
window - instead just acking them. This one has been requeued for v3.19.
- Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-07 14:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 20:18 [PATCH] arm: omap: hwmod: drop unnecessary list initialization Felipe Balbi
2014-07-28 5:24 ` Paul Walmsley
2014-11-04 5:39 ` Felipe Balbi
2014-11-06 16:19 ` Felipe Balbi
2014-11-07 14:09 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox