arm: omap: hwmod: drop unnecessary list initialization
Subsystems (4)
PATCH 1/1 arm: omap: hwmod: drop unnecessary list initialization
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.
---
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(-)
arch/arm/mach-omap2/omap_hwmod.c +0 -2
@@ -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++;
Signature · 1 line
2.0.1.563.g66f467c
Paul Walmsley
maintainerPATCH 1/1 arm: omap: hwmod: drop unnecessary list initialization
Quoted 13 lines · Felipe Balbi
ml->nodeandsl->nodeare currently initialized
by means ofINIT_LIST_HEAD(). That initialiation
is followed by alist_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;
Quoted 8 lines
from this, it's clear that both
INIT_LIST_HEAD()calls are unnecessary and can be safely removed.Signed-off-by Felipe Balbi <[email protected]>---
found by code inspection, boot tested on am437x SK on today's linux-next + pending patches.
Thanks, queued for v3.18.
- Paul
PATCH 1/1 arm: omap: hwmod: drop unnecessary list initialization
Hi,
Quoted 18 lines · Paul Walmsley
Quoted 16 lines · Felipe Balbi
ml->nodeandsl->nodeare currently initialized
by means ofINIT_LIST_HEAD(). That initialiation
is followed by alist_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.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Felipe Balbi <[email protected]>---
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 [email protected] linus/master ^v3.17 -- arch/arm/mach-omap2/omap_hwmod.c $
Signature · 1 line
balbi
PATCH 1/1 arm: omap: hwmod: drop unnecessary list initialization
Quoted 27 lines · Felipe Balbi
Hi,
Quoted 24 lines · Paul Walmsley
Quoted 21 lines · Felipe Balbi
ml->nodeandsl->nodeare currently initialized
by means ofINIT_LIST_HEAD(). That initialiation
is followed by alist_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 <[email protected]>---
found by code inspection, boot tested on am437x SK on today's linux-next + pending patches.
Quoted 6 lines
Quoted 1 line
Thanks, queued for v3.18.
This is not on v3.18, what happened ?
$ git log [email protected] linus/master ^v3.17 -- arch/arm/mach-omap2/omap_hwmod.c $
ping
Signature · 1 line
balbi
Paul Walmsley
maintainerPATCH 1/1 arm: omap: hwmod: drop unnecessary list initialization
Hi
Quoted 28 lines · Felipe Balbi
Quoted 27 lines · Felipe Balbi
Hi,
Quoted 24 lines · Paul Walmsley
Quoted 21 lines · Felipe Balbi
ml->nodeandsl->nodeare currently initialized
by means ofINIT_LIST_HEAD(). That initialiation
is followed by alist_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 <[email protected]>---
found by code inspection, boot tested on am437x SK on today's linux-next + pending patches.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
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