Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Alex Deymo <deymo@chromium.org>
Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org,
	keybuk@chromium.org
Subject: Re: [PATCH v2 1/8] core: Convert the pincode callback to an interable list.
Date: Tue, 23 Apr 2013 10:50:02 +0300	[thread overview]
Message-ID: <20130423075002.GA12102@x220> (raw)
In-Reply-To: <1365809318-17775-2-git-send-email-deymo@chromium.org>

Hi Alex,

On Fri, Apr 12, 2013, Alex Deymo wrote:
> The current pincode callback list on the adapter keeps track of all the
> pincode callbacks registered by a plugin for that adapter and calls each
> one until one provides a pincode for the current bonding. This mechanism
> forgets about what happened with previous bonding attempts and pushes the
> status track to the plugin side.
> 
> This patch creates an iterator struct (struct pincb_iter) that keeps track
> of the last function called and the number of times called. This will
> allow to provide more information about the bonding status to the pincode
> callback.
> ---
>  src/adapter.c | 52 ++++++++++++++++++++++++++++++++++++++++++++--------
>  src/adapter.h |  4 ++++
>  src/device.c  | 13 +++++++++++++
>  src/device.h  |  1 +
>  4 files changed, 62 insertions(+), 8 deletions(-)

This patch doesn't pass basic coding style checks:

Applying: core: Convert the pincode callback to an interable list.
ERROR:OPEN_BRACE: open brace '{' following function declarations go on the next line
#24: FILE: src/adapter.c:4778:
+struct pincb_iter *pincb_iter_new(struct btd_adapter *adapter) {

ERROR:OPEN_BRACE: open brace '{' following function declarations go on the next line
#33: FILE: src/adapter.c:4787:
+void pincb_iter_free(struct pincb_iter *iter) {

ERROR:OPEN_BRACE: open brace '{' following function declarations go on the next line
#37: FILE: src/adapter.c:4791:
+gboolean pincb_iter_end(struct pincb_iter *iter) {

ERROR:OPEN_BRACE: open brace '{' following function declarations go on the next line
#144: FILE: src/device.c:3749:
+struct pincb_iter *device_bonding_iter(struct btd_device *device) {

Please fix those (and in other patches too if you have them). FWIW, I'm
using the following in my .git/hooks/pre-{applypatch,commit}:

git diff --cached | ~/src/linux/scripts/checkpatch.pl --no-signoff --ignore INITIALISED_STATIC,NEW_TYPEDEFS,VOLATILE,PARENTHESIS_ALIGNMENT --show-types --mailback -

The above assumes you've got a recent kernel source directory in ~/src/linux.

Johan

  reply	other threads:[~2013-04-23  7:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 23:28 [PATCH v2 0/8] Autopair plugin, with some extensions Alex Deymo
2013-04-12 23:28 ` [PATCH v2 1/8] core: Convert the pincode callback to an interable list Alex Deymo
2013-04-23  7:50   ` Johan Hedberg [this message]
2013-04-12 23:28 ` [PATCH v2 2/8] plugins: Extend the pin code callback with the call number Alex Deymo
2013-04-12 23:28 ` [PATCH v2 3/8] core: Add support for retrying a bonding Alex Deymo
2013-04-12 23:28 ` [PATCH v2 4/8] core: retry bonding attempt until the iterator reachs the end Alex Deymo
2013-04-12 23:28 ` [PATCH v2 5/8] core: Add device_get_class to the public interface Alex Deymo
2013-04-12 23:28 ` [PATCH v2 6/8] autopair: Add the autopair plugin Alex Deymo
2013-04-12 23:28 ` [PATCH v2 7/8] core: Expose the last bonding attempt duration on retry Alex Deymo
2013-04-12 23:28 ` [PATCH v2 8/8] autopair: Try a fixed pincode for keyboards rejecting random codes Alex Deymo
2013-04-22 17:51 ` [PATCH v2 0/8] Autopair plugin, with some extensions Alex Deymo

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=20130423075002.GA12102@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=deymo@chromium.org \
    --cc=keybuk@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox