From patchwork Tue Jul 7 15:02:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameya Palande X-Patchwork-Id: 34462 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n67F2aMj027828 for ; Tue, 7 Jul 2009 15:02:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757809AbZGGPC1 (ORCPT ); Tue, 7 Jul 2009 11:02:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758098AbZGGPC1 (ORCPT ); Tue, 7 Jul 2009 11:02:27 -0400 Received: from smtp.nokia.com ([192.100.122.230]:61470 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757809AbZGGPC0 (ORCPT ); Tue, 7 Jul 2009 11:02:26 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n67F2D1V005505; Tue, 7 Jul 2009 18:02:15 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 7 Jul 2009 18:02:12 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 7 Jul 2009 18:02:12 +0300 Received: from localhost.localdomain (esdhcp04183.research.nokia.com [172.21.41.83]) by mgw-sa02.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n67F26IW018256; Tue, 7 Jul 2009 18:02:10 +0300 From: Ameya Palande To: linux-omap@vger.kernel.org Cc: x0095840@ti.com, h-kanigeri2@ti.com, ext-phil.2.carmody@nokia.com Subject: [PATCH 4/4] DSPBRIDGE: Remove unnecessary conditions from some for loops Date: Tue, 7 Jul 2009 18:02:07 +0300 Message-Id: <1246978928-7139-4-git-send-email-ameya.palande@nokia.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1246978928-7139-3-git-send-email-ameya.palande@nokia.com> References: <1246978928-7139-1-git-send-email-ameya.palande@nokia.com> <1246978928-7139-2-git-send-email-ameya.palande@nokia.com> <1246978928-7139-3-git-send-email-ameya.palande@nokia.com> X-OriginalArrivalTime: 07 Jul 2009 15:02:12.0074 (UTC) FILETIME=[E8217CA0:01C9FF13] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The status cannot be a failure value at the start of the loops, and the only changes to a failure state are accompanied by a break or goto, so these conditions are always true. Signed-off-by: Phil Carmody --- drivers/dsp/bridge/pmgr/wcd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c index 811b2fc..6b2136a 100644 --- a/drivers/dsp/bridge/pmgr/wcd.c +++ b/drivers/dsp/bridge/pmgr/wcd.c @@ -904,7 +904,7 @@ u32 PROCWRAP_Load(union Trapped_Args *args) goto func_cont; } - for (i = 0; DSP_SUCCEEDED(status) && (i < count); i++) { + for (i = 0; i < count; i++) { if (argv[i]) { /* User space pointer to argument */ temp = (char *) argv[i]; @@ -945,7 +945,7 @@ u32 PROCWRAP_Load(union Trapped_Args *args) envp = NULL; goto func_cont; } - for (i = 0; DSP_SUCCEEDED(status) && envp[i]; i++) { + for (i = 0; envp[i]; i++) { /* User space pointer to argument */ temp = (char *)envp[i]; /* len is increased by 1 to accommodate NULL */