From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Walmsley Subject: Re: [PATCH] arm: omap: hwmod: drop unnecessary list initialization Date: Mon, 28 Jul 2014 05:24:34 +0000 (UTC) Message-ID: References: <1405455492-1087-1-git-send-email-balbi@ti.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from utopia.booyaka.com ([74.50.51.50]:52559 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbaG1FYf (ORCPT ); Mon, 28 Jul 2014 01:24:35 -0400 In-Reply-To: <1405455492-1087-1-git-send-email-balbi@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Felipe Balbi Cc: Tony Lindgren , Linux OMAP Mailing List , Linux ARM Kernel Mailing List 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 > --- > > found by code inspection, boot tested on am437x SK on today's > linux-next + pending patches. Thanks, queued for v3.18. - Paul