public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: "Rogério Brito" <rbrito@ime.usp.br>
Cc: linux-kernel@vger.kernel.org,
	"Gustavo F. Padovan" <padovan@profusion.mobi>
Subject: Re: [PATCH 02/02] ath3k: Avoid duplication of code
Date: Fri, 28 Jan 2011 09:56:55 +0100	[thread overview]
Message-ID: <4D4284D7.8000200@ahsoftware.de> (raw)
In-Reply-To: <20110127232453.GA3531@ime.usp.br>

Hello Rogério,

Am 28.01.2011 00:24, schrieb Rogério Brito:

> The resuting code has some redundancy and the compiler can potentially
> produce better code if we omit a function call that is unconditionally
> executed in


> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index a126e61..d51c5a3 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -116,13 +116,10 @@ static int ath3k_probe(struct usb_interface *intf,
>   		return -EIO;
>   	}
>
> -	if (ath3k_load_firmware(udev, firmware)) {
> -		release_firmware(firmware);
> -		return -EIO;
> -	}
> +	ret = ath3k_load_firmware(udev, firmware);
>   	release_firmware(firmware);
>
> -	return 0;
> +	return ret ? -EIO : 0;
>   }

Looks nice, but doesn't compile. I assume you should at least try to 
compile the stuff you want to change. ;)

Regards,

Alexander


  reply	other threads:[~2011-01-28  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 23:24 [PATCH 02/02] ath3k: Avoid duplication of code Rogério Brito
2011-01-28  8:56 ` Alexander Holler [this message]
2011-01-28 22:18   ` [PATCH] " Rogério Brito
2011-01-29 11:59     ` Alexander Holler
2011-01-30 21:38       ` Rogério Brito
2011-02-02 16:37     ` Gustavo F. Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D4284D7.8000200@ahsoftware.de \
    --to=holler@ahsoftware.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    --cc=rbrito@ime.usp.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox