All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] new sco flowcontrol patch
Date: Mon, 02 Apr 2007 17:36:38 +0200	[thread overview]
Message-ID: <1175528198.5815.362.camel@violet> (raw)
In-Reply-To: <4604B9F2.5040808@xmission.com>

Hi Brad,

> > The biggest thing however is hci_sched_sco(). This function is ugly as
> > hell and basically unreadable. Please use break or continue instead of
> > cascaded if clauses. I am not gonna review this piece of the patch until
> > that is fixed.
> 
> I fixed a few whitespace problems and changed hci_sched_sco so it didn't 
> get deep into nested if's. How does it look now?

please also fix the other coding style issues. Some comments and a lot
of if clauses are violating the whitespace requirements. It is "if ("
and not "if(". It is also "(char *) &val" and not "(char *)&val".

And the code in sco_sock_queue_rcv_skb() is bad. We don't initialize
variables if not really needed. In this case if skb_queue_len() check
fails simply call return -ENOMEM. Strip the label and call return 0 at
the end of the function. Don't make the code more complex than it
actually is.

And no forward declaration of sco_sock_queue_rcv_skb() if not really
needed.

Why are we using SCO_TXBUFS and not reuse SO_SNDBUF since the value is
directly mapped to sk_sndbuf. Same applies to sk_rcvbuf.

And why do we have to do "c->tx_timer.function = hci_sco_tx_timer" over
and over again. Isn't it enough if we set the timer function once after
init of the timer.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2007-04-02 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 13:07 [Bluez-devel] new sco flowcontrol patch Brad Midgley
2007-03-21 14:11 ` Marcel Holtmann
2007-03-21 15:18   ` Brad Midgley
2007-03-24  5:41   ` Brad Midgley
2007-04-02 15:36     ` Marcel Holtmann [this message]
2007-04-03 21:04       ` Brad Midgley
2007-04-03 21:08         ` Marcel Holtmann
2007-04-03 22:08       ` Brad Midgley

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=1175528198.5815.362.camel@violet \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /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.