RE: [PATCH 4/4] DSPBRIDGE: Remove unnecessary conditions from some for loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Yes you are right thanks for the patch.

> -----Original Message-----
> From: Ameya Palande [mailto:ameya.palande@xxxxxxxxx]
> Sent: Thursday, July 02, 2009 9:21 AM
> To: linux-omap@xxxxxxxxxxxxxxx
> Cc: Guzman Lugo, Fernando; Kanigeri, Hari; ext-phil.2.carmody@xxxxxxxxx
> Subject: [PATCH 4/4] DSPBRIDGE: Remove unnecessary conditions from some
> for loops
> 
> 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 <ext-phil.2.carmody@xxxxxxxxx>
> ---
>  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 2fd9f8c..a1bd2c7 100644
> --- a/drivers/dsp/bridge/pmgr/wcd.c
> +++ b/drivers/dsp/bridge/pmgr/wcd.c
> @@ -900,7 +900,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] != NULL) {
>                          /* User space pointer to argument */
>  			temp = (char *) argv[i];
> @@ -941,7 +941,7 @@ u32 PROCWRAP_Load(union Trapped_Args *args)
>  			envp = NULL;
>  			goto func_cont;
>  		}
> -		for (i = 0; DSP_SUCCEEDED(status) && (envp[i] != NULL); i++) {
> +		for (i = 0; envp[i] != NULL; i++) {
>                          /* User space pointer to argument */
>  			temp = (char *)envp[i];
>  			len = strlen_user((char *)temp);
> --
> 1.6.2.4
> 

Acked-by Fernando Guzman Lugo <x0095840@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux