linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Steven Walter <stevenrwalter@gmail.com>,
	"Gustavo F. Padovan" <gustavo@padovan.org>,
	BlueZ development <linux-bluetooth@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] Bluetooth: automatically flushable packets aren't allowed on LE links
Date: Thu, 27 Nov 2014 12:14:40 +0200	[thread overview]
Message-ID: <20141127101440.GA11656@t440s> (raw)
In-Reply-To: <50D951D4-0A99-4D77-814C-D80A209B3D4F@holtmann.org>

Hi Marcel,

On Wed, Nov 26, 2014, Marcel Holtmann wrote:
> >>>> I think Marcel was after just providing a clarifying code comment in
> >>>> both places - having two branches of an if-statement doing exactly the
> >>>> same thing looks a bit weird to me. To make thins completely clear I'd
> >>>> suggest adding a simple helper function that you can call from both
> >>>> places to get the needed flags, something like the following:
> >>> 
> >>> I am actually fine with just adding a comment explaining the complex if
> >>> statement on why it is correct. It is just a helper for everybody to
> >>> understand what and why it is done that way.
> >> 
> >> 
> >> Is the comment I added sufficient, or should I add one for the other if
> >> condition as well?  To me, the second condition is pretty straightforward:
> >> if the caller requested it and the hardware supports it, use NO_FLUSH.  The
> >> relationship between FLUSH/NO_FLUSH and low-energy is much less clear and
> >> more justifies a comment, in my opinion.
> > 
> > Did a miss a reply to this?  How would you like the next iteration of
> > the patch to look?
> 
> can you just send a v4 and I have a look at it. I thing it is best to
> keep the original patch with the rather complicated if statement you
> had. And then add a comment in front of it, why it is that way and
> that it is correct this way.

Since this is moving way too slow for such a trivial patch I went ahead
and added the necessary comments myself and pushed the patch upstream
(to bluetooth-next). So no need to send new revisions of this one.

Johan

  reply	other threads:[~2014-11-27 10:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 14:46 [PATCH] l2cap_core: automatically flushable packets aren't supported by LE-only devices Steven Walter
2014-11-18 22:01 ` Marcel Holtmann
2014-11-19 14:41   ` [PATCH v2] l2cap_core: automatically flushable packets aren't allowed on LE links Steven Walter
2014-11-19 14:48     ` Marcel Holtmann
2014-11-19 17:59       ` [PATCH v3] Bluetooth: " Steven Walter
2014-11-20 11:38         ` Johan Hedberg
2014-11-20 13:50           ` Marcel Holtmann
2014-11-20 14:57             ` Johan Hedberg
2014-11-20 15:51             ` Steven Walter
2014-11-25 14:53               ` Steven Walter
2014-11-26  5:16                 ` Marcel Holtmann
2014-11-27 10:14                   ` Johan Hedberg [this message]
2014-11-27 15:06                     ` Steven Walter

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=20141127101440.GA11656@t440s \
    --to=johan.hedberg@gmail.com \
    --cc=gustavo@padovan.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=stevenrwalter@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).