All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-bluetooth@vger.kernel.org, linux-usb@vger.kernel.org,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Arjan Van De Ven <arjan@linux.intel.com>,
	saharabeara@gmail.com
Subject: Re: btusb autosuspend and circular lock dep
Date: Mon, 24 Aug 2009 12:59:22 -0700	[thread overview]
Message-ID: <1251143962.2950.63.camel@localhost.localdomain> (raw)
In-Reply-To: <200908242149.51588.oliver@neukum.org>

Hi Oliver,

> > > > > > I see.  I removed that case and re-tested.  The simple down, auto,
> > > > > > up, down test worked fine.  However, the down, up, wait, auto test
> > > > > > failed. Logs of the success and the failure are attached.
> > > > >
> > > > > Very well, this version works for me.
> > > >
> > > > can you send a clean version so we can merge this into 2.6.32. This
> > > > version still has the debug details in there. And please send it to the
> > > > mailing list for reference.
> 
> And again.
> 
> > > +	if (!err < 0)
> > > +		return;
> >
> > This looks like a typo.
> 
> Fixed
> >
> 
> > > @@ -989,9 +1123,10 @@ static int btusb_resume(struct usb_interface *intf)
> > >  		err = btusb_submit_bulk_urb(hdev, GFP_NOIO);
> > >  		if (err < 0) {
> > >  			clear_bit(BTUSB_BULK_RUNNING, &data->flags);
> > > -			return err;
> > > -		} else
> > > +			goto failed;
> > > +		} else {
> > >  			btusb_submit_bulk_urb(hdev, GFP_NOIO);
> > > +		}
> > >  	}
> >
> > Normally we don't put braces around single else or if statement.
> 
> Quoting CodingStyle.txt:
> This does not apply if one branch of a conditional statement is a single
> statement. Use braces in both branches.
> 
> if (condition) {
> 	do_this();
> 	do_that();
> } else {
> 	otherwise();
> }

okay, then we have to violate coding style here since throughout the
whole Bluetooth subsystem we don't do { } around single statements. And
this applies to single else statements.

Regards

Marcel



  reply	other threads:[~2009-08-24 19:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090615175435.GA4772@gamba.jf.intel.com>
     [not found] ` <200906210034.42481.oliver@neukum.org>
     [not found]   ` <1251102046.2950.28.camel@localhost.localdomain>
2009-08-24  9:49     ` btusb autosuspend and circular lock dep Oliver Neukum
2009-08-24 10:16       ` Marcel Holtmann
2009-08-24 12:29         ` Oliver Neukum
2009-08-24 16:56           ` Marcel Holtmann
2009-08-24 13:59     ` Oliver Neukum
2009-08-24 17:03       ` Marcel Holtmann
2009-08-24 19:49         ` Oliver Neukum
2009-08-24 19:59           ` Marcel Holtmann [this message]
2009-08-24 21:26             ` Oliver Neukum
2009-08-24 21:36               ` Marcel Holtmann
2009-08-24 21:44                 ` Oliver Neukum
2009-08-24 21:58                   ` Sarah Sharp
2009-08-24 22:49                     ` Sarah Sharp
2009-08-24 23:07                       ` Marcel Holtmann
2009-08-24 23:30                   ` Marcel Holtmann

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=1251143962.2950.63.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=arjan@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=saharabeara@gmail.com \
    --cc=sarah.a.sharp@linux.intel.com \
    /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.