All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v2 1/4] Bluetooth: Add option for SCO socket mode
Date: Fri, 1 Feb 2013 10:26:04 -0600	[thread overview]
Message-ID: <20130201162604.GA24448@x220> (raw)
In-Reply-To: <1359561800-12870-2-git-send-email-frederic.dalleau@linux.intel.com>

Hi Frédéric,

On Wed, Jan 30, 2013, Frédéric Dalleau wrote:
> +#define SCO_MODE_CVSD		0x00
> +#define SCO_MODE_TRANSPARENT	0x01
> +#define SCO_MODE_MAX            0x02

If you're going to have a MAX define better make it the real maximum
instead of max + 1.

> +		if (opts.mode >= SCO_MODE_MAX) {
> +			err = -EINVAL;
> +			break;
> +		}

It makes this check also look a bit nicer since you use > instead of >=

Johan

  reply	other threads:[~2013-02-01 16:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 16:03 [PATCH v2 0/4] sco: SCO socket option for mode Frédéric Dalleau
2013-01-30 16:03 ` [PATCH v2 1/4] Bluetooth: Add option for SCO socket mode Frédéric Dalleau
2013-02-01 16:26   ` Johan Hedberg [this message]
2013-01-30 16:03 ` [PATCH v2 2/4] Bluetooth: Use mode to create SCO connection Frédéric Dalleau
2013-02-01 16:29   ` Johan Hedberg
2013-01-30 16:03 ` [PATCH v2 3/4] Bluetooth: Parameters for outgoing SCO connections Frédéric Dalleau
2013-01-30 16:03 ` [PATCH v2 4/4] Bluetooth: Fallback transparent SCO from T2 to T1 Frédéric Dalleau

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=20130201162604.GA24448@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=frederic.dalleau@linux.intel.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.