All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
To: linux-bluetooth@vger.kernel.org, johan.hedberg@gmail.com
Subject: Re: [PATCH_v4 3/7] android/pan: shutdown io channel on disconnect call
Date: Thu, 19 Dec 2013 10:48:03 +0200	[thread overview]
Message-ID: <52B2B2C3.2030802@linux.intel.com> (raw)
In-Reply-To: <20131219081452.GB31549@x220.p-661hnu-f1>

Hi Johan,

On 19.12.2013 10:14, Johan Hedberg wrote:
> Hi Ravi,
>
> On Wed, Dec 18, 2013, Ravi kumar Veeramally wrote:
>> Shutdown io channel and send DISCONNECTING notification and send
>> DISCONNECTED notification and free the device on callback.
>> ---
>>   android/pan.c | 20 ++++++++++----------
>>   1 file changed, 10 insertions(+), 10 deletions(-)
> I've applied the first two patches, but one thing with this one:
>
>> diff --git a/android/pan.c b/android/pan.c
>> index b83f534..f64b09a 100644
>> --- a/android/pan.c
>> +++ b/android/pan.c
>> @@ -269,7 +269,7 @@ static void bt_pan_disconnect(const void *buf, uint16_t len)
>>   {
>>   	const struct hal_cmd_pan_disconnect *cmd = buf;
>>   	struct pan_device *dev;
>> -	uint8_t status;
>> +	uint8_t status = HAL_STATUS_FAILED;
>>   	GSList *l;
>>   	bdaddr_t dst;
>>   
>> @@ -278,20 +278,20 @@ static void bt_pan_disconnect(const void *buf, uint16_t len)
>>   	android2bdaddr(&cmd->bdaddr, &dst);
>>   
>>   	l = g_slist_find_custom(devices, &dst, device_cmp);
>> -	if (!l) {
>> -		status = HAL_STATUS_FAILED;
>> +	if (!l)
>>   		goto failed;
> Since we in general try to avoid initializations upon declaration I'd
> keep the status = HAL_STATUS_FAILED here. Even if it would be ok to move
> it it shouldn't be in this patch since it's unrelated.
  Ok, make sense. I'll send you updated patch set from 3-7 in a moment.

Thanks,
Ravi.

  reply	other threads:[~2013-12-19  8:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 14:53 [PATCH_v4 1/7] android/pan: Free device after sending diconnected notification Ravi kumar Veeramally
2013-12-18 14:53 ` [PATCH_v4 2/7] android/pan: Change local_role to NONE only when device list is empty Ravi kumar Veeramally
2013-12-18 14:53 ` [PATCH_v4 3/7] android/pan: shutdown io channel on disconnect call Ravi kumar Veeramally
2013-12-19  8:14   ` Johan Hedberg
2013-12-19  8:48     ` Ravi kumar Veeramally [this message]
2013-12-18 14:53 ` [PATCH_v4 4/7] bnep: Rename struct bnep_conn to struct bnep for better readability Ravi kumar Veeramally
2013-12-18 14:53 ` [PATCH_v4 5/7] bnep: Add bnep_new and bnep_free api's Ravi kumar Veeramally
2013-12-18 14:53 ` [PATCH_v4 6/7] bnep: Refactored bnep connect and disconnect calls Ravi kumar Veeramally
2013-12-18 14:53 ` [PATCH_v4 7/7] bnep: Refactored bnep server apis for bridge addition and deletion Ravi kumar Veeramally

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=52B2B2C3.2030802@linux.intel.com \
    --to=ravikumar.veeramally@linux.intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.