Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: kernel@gkr.i24.cc
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v4] hid2hci add CSR 8510 A10 support
Date: Wed, 7 Jan 2015 22:31:59 +0200	[thread overview]
Message-ID: <20150107203159.GA4571@t440s.P-661HNU-F1> (raw)
In-Reply-To: <1420625417-9282-1-git-send-email-kernel@gkr.i24.cc>

Hi Gordon,

On Wed, Jan 07, 2015, kernel@gkr.i24.cc wrote:
> add a new method "csr2" to hid2hci that sends a control message
> to the usb device which switches the Cambridge Silicon Radio 8510 A10
> as used in Sitecom CNT-524
> 
> fixes: https://bugzilla.kernel.org/show_bug.cgi?id=69181
> ---
> 
> Notes:
>     4th version, coding style corrections from Johan Hedberg and Anderson Lizardo, resend
> 
>  tools/hid2hci.1 |  2 +-
>  tools/hid2hci.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 51 insertions(+), 2 deletions(-)

I was about to apply this but it doesn't compile:

make --no-print-directory all-am
  CC       tools/hid2hci.o
tools/hid2hci.c: In function ‘usb_switch_csr2’:
tools/hid2hci.c:152:14: error: pointer targets in passing argument 6 of ‘control_message’ differ in signedness [-Werror=pointer-sign]
           0, report, sizeof(report), 5000);
              ^
tools/hid2hci.c:78:12: note: expected ‘char *’ but argument is of type ‘uint8_t *’
 static int control_message(int fd, int requesttype, int request,
            ^
tools/hid2hci.c:124:6: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  int err;
      ^
cc1: all warnings being treated as errors

Please use ./configure --enable-maintainer-mode to verify that the build
is clean (or ./bootstrap-configure && make).

> +	uint8_t report[] = {
> +		0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
> +	};

Minor improvement: you might want to declare this as const.

Johan

  reply	other threads:[~2015-01-07 20:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 21:59 PATCH hid2hci for CSR 8510 A10 Gordon
2014-03-28 19:21 ` Gordon
2014-03-28 19:49   ` Johan Hedberg
2014-03-28 20:23     ` Gordon
2014-03-29 11:37     ` Gordon
2014-03-29 11:37       ` [PATCH] hid2hci add CSR 8510 A10 support Gordon
2014-03-31 12:17         ` Anderson Lizardo
2014-04-01 21:38           ` [PATCH v3] " Gordon
2015-01-07  8:24             ` Gordon
2015-01-07  9:12               ` Johan Hedberg
2015-01-07 10:10                 ` [PATCH v4] " kernel
2015-01-07 20:31                   ` Johan Hedberg [this message]
2015-01-07 20:52                     ` Gordon
2015-01-07 21:21                     ` Gordon
2015-01-07 22:03                     ` [PATCH v5 0/2] " kernel
2015-01-07 22:03                       ` [PATCH v5 1/2] " kernel
2015-01-07 22:04                       ` [PATCH v5 2/2] use const uint_8* for pointer in control_message kernel
2015-01-08 10:02                       ` [PATCH v5 0/2] hid2hci add CSR 8510 A10 support Johan Hedberg

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=20150107203159.GA4571@t440s.P-661HNU-F1 \
    --to=johan.hedberg@gmail.com \
    --cc=kernel@gkr.i24.cc \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox