From patchwork Wed Sep 23 17:37:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 54073 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 4F7D722E14 for ; Wed, 23 Sep 2015 17:39:16 +0000 (UTC) Received: by laff1 with SMTP id f1sf9743912laf.2 for ; Wed, 23 Sep 2015 10:39:15 -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 :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=fCDbCvCl1qgzH3Aebqa7CnOvi3PB30/DYZbOm8fzy3o=; b=WEb+s9qeLjE9xckl6SZhwpYpkYAQmwSnIPJgUUIJ2Um2IeGK2bt0vKNpFLdRujC0Yj On8G2NYBtDm3LBPJt0lDldCBmU2vNtLjYpyOnXf8Sxc4frqHSbtSiEAvHhjn+ZWTfUhq NNe7kN3az8+MYGrbZYwibZiTa4gzE/xB7XfYQZb3UyKffi5dsSXYSvpsB2yOHi0bHgmX QNO0lkypokmn0PC5xyvyNUT/uMvZdQYIJMF747qdVja3Gx3u6a6DF358ZbwLqD8p+4Ph gAFVSdHECjpAIzaM4K8iw4yBMHIFa4/w//NSZzifhc3AOV/OffFa+p3W9TeDuw8/suWG ZZow== X-Gm-Message-State: ALoCoQkqLYuNlNKRRaKwf5q01jKoi0YpwNcY3KXixUC9vVQva3wbYr6wsptKAdUczx5wMxA5cJ0k X-Received: by 10.112.140.195 with SMTP id ri3mr5600501lbb.22.1443029955248; Wed, 23 Sep 2015 10:39:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.233 with SMTP id i9ls6164lae.4.gmail; Wed, 23 Sep 2015 10:39:15 -0700 (PDT) X-Received: by 10.112.13.136 with SMTP id h8mr12062956lbc.23.1443029955025; Wed, 23 Sep 2015 10:39:15 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id l9si4554873lae.99.2015.09.23.10.39.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 10:39:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagj9 with SMTP id j9so59853049lag.2 for ; Wed, 23 Sep 2015 10:39:14 -0700 (PDT) X-Received: by 10.112.199.70 with SMTP id ji6mr12129899lbc.73.1443029954525; Wed, 23 Sep 2015 10:39:14 -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.112.59.35 with SMTP id w3csp29034lbq; Wed, 23 Sep 2015 10:39:13 -0700 (PDT) X-Received: by 10.66.242.138 with SMTP id wq10mr22540441pac.2.1443029953530; Wed, 23 Sep 2015 10:39:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ha2si12020325pbc.233.2015.09.23.10.39.12; Wed, 23 Sep 2015 10:39:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756595AbbIWRit (ORCPT + 30 others); Wed, 23 Sep 2015 13:38:49 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:39923 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755794AbbIWRg6 (ORCPT ); Wed, 23 Sep 2015 13:36:58 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8NHat8M009736; Wed, 23 Sep 2015 12:36:55 -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 t8NHatlQ030085; Wed, 23 Sep 2015 12:36:55 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Wed, 23 Sep 2015 12:36:55 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8NHarOT021888; Wed, 23 Sep 2015 12:36:55 -0500 From: Murali Karicheri To: , , , , , CC: Subject: [PATCH 2/7] net: netcp: remove dead code from the driver Date: Wed, 23 Sep 2015 13:37:06 -0400 Message-ID: <1443029831-22035-3-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443029831-22035-1-git-send-email-m-karicheri2@ti.com> References: <1443029831-22035-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m-karicheri2@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.215.43 as permitted sender) smtp.mailfrom=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: , netcp_core is the first driver that will get initialized and the modules (ethss, pa etc) will then get initialized. So the code at the end of netcp_probe() that iterate over the modules is a dead code as the module list will be always be empty. So remove this code. Signed-off-by: Murali Karicheri --- drivers/net/ethernet/ti/netcp_core.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index 1a5aca5..c0bc4b9 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -2040,7 +2040,6 @@ static int netcp_probe(struct platform_device *pdev) struct device_node *child, *interfaces; struct netcp_device *netcp_device; struct device *dev = &pdev->dev; - struct netcp_module *module; int ret; if (!node) { @@ -2087,14 +2086,6 @@ static int netcp_probe(struct platform_device *pdev) /* Add the device instance to the list */ list_add_tail(&netcp_device->device_list, &netcp_devices); - /* Probe & attach any modules already registered */ - mutex_lock(&netcp_modules_lock); - for_each_netcp_module(module) { - ret = netcp_module_probe(netcp_device, module); - if (ret < 0) - dev_err(dev, "module(%s) probe failed\n", module->name); - } - mutex_unlock(&netcp_modules_lock); return 0; probe_quit_interface: