From patchwork Tue Jul 15 20:18:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 33698 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 10698201F1 for ; Tue, 15 Jul 2014 20:18:50 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g18sf33244483oah.10 for ; Tue, 15 Jul 2014 13:18:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=Ndiw19pDXeYyOU1plrRz8MHqmPeSD5wB8RP8rh1BEW0=; b=QLjheHq27nG3bT76d9+Tg5TxmRaQJrUvWY6aeAhL1TX2OTcJ4Ddlsn7+4MWjaogTU4 DmM8DJqcK8si9qgcpBCK5nBQ8TVoWHDJpJgoGpMp7TphX8B9j1pWO0UQffrLGw0z4PWr NxXxNZJuWzBMEHgjTedk7Dg53ZYSpciGH24np22mmR/4Y0WmWNWenU7Z9LR3o58kgAdJ bRMpiD/zOH4KJVM2qF3FtDnOYkaRSOkz3zyAuf8u31RnfYdtJE6CfFJJlTWFv/DNx8/o mN2es3IZVIe4qo+32DJU/n795CB0TJ0KL7R3ZJvYrJojPl0WQggLBUGxUu1lPYgekQrW KheQ== X-Gm-Message-State: ALoCoQk2vhObImMCyYPkKNyVgwK1k1EGCoqfQ6ZLO6VabuBJv4vFneLf4H5tWPWI8HEe1Da8Qr5E X-Received: by 10.182.27.40 with SMTP id q8mr12551904obg.22.1405455530590; Tue, 15 Jul 2014 13:18:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.211 with SMTP id j77ls212324qgd.37.gmail; Tue, 15 Jul 2014 13:18:50 -0700 (PDT) X-Received: by 10.220.5.138 with SMTP id 10mr2734956vcv.67.1405455530504; Tue, 15 Jul 2014 13:18:50 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id ha4si7306126veb.1.2014.07.15.13.18.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jul 2014 13:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so1577803vcb.27 for ; Tue, 15 Jul 2014 13:18:50 -0700 (PDT) X-Received: by 10.220.182.5 with SMTP id ca5mr3137223vcb.50.1405455530300; Tue, 15 Jul 2014 13:18:50 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp242143vcb; Tue, 15 Jul 2014 13:18:49 -0700 (PDT) X-Received: by 10.70.52.138 with SMTP id t10mr24909457pdo.90.1405455529509; Tue, 15 Jul 2014 13:18:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15si6304591pdm.55.2014.07.15.13.18.48; Tue, 15 Jul 2014 13:18:48 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757936AbaGOUSr (ORCPT + 6 others); Tue, 15 Jul 2014 16:18:47 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:37136 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757627AbaGOUSq (ORCPT ); Tue, 15 Jul 2014 16:18:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6FKIMsW022007; Tue, 15 Jul 2014 15:18:22 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6FKIMHR032146; Tue, 15 Jul 2014 15:18:22 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Tue, 15 Jul 2014 15:18:22 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6FKILog008111; Tue, 15 Jul 2014 15:18:22 -0500 From: Felipe Balbi To: CC: Tony Lindgren , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Felipe Balbi Subject: [PATCH] arm: omap: hwmod: drop unnecessary list initialization Date: Tue, 15 Jul 2014 15:18:12 -0500 Message-ID: <1405455492-1087-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.1.563.g66f467c MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. 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++;