From: Johan Hedberg <johan.hedberg@gmail.com>
To: Jakub Pawlowski <jpawlowski@google.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 1/8] emulator: add support for checking le scan state
Date: Mon, 5 Oct 2015 11:11:35 +0300 [thread overview]
Message-ID: <20151005081135.GB632@t440s.lan> (raw)
In-Reply-To: <1441216275-2954-1-git-send-email-jpawlowski@google.com>
Hi Jakub,
(sorry for the late review)
On Wed, Sep 02, 2015, Jakub Pawlowski wrote:
> +const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu)
> +{
> + if (!hciemu || !hciemu->master_dev)
> + return NULL;
> +
> + return btdev_is_le_scan_enabled(hciemu->master_dev);
> +}
> +
> bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
> hciemu_command_func_t function, void *user_data)
> {
> diff --git a/emulator/hciemu.h b/emulator/hciemu.h
> index 41ca3fc..a526d8c 100644
> --- a/emulator/hciemu.h
> +++ b/emulator/hciemu.h
> @@ -53,6 +53,8 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu);
> const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu);
> const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);
>
> +const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);
The 'const' doesn't make any sense together with 'bool'. With pointers
it means the data behind the pointer is read-only. It also makes the
patch fail to compile:
In file included from tools/mgmt-tester.c:41:0:
./emulator/hciemu.h:56:11: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
const bool hciemu_is_master_le_scan_enabled(struct hciemu *hciemu);
Johan
next prev parent reply other threads:[~2015-10-05 8:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 17:51 [PATCH v3 1/8] emulator: add support for checking le scan state Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 2/8] tools/l2cap-tester: add close socket test Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 3/8] emulator: add BT_HCI_CMD_LE_CREATE_CONN_CANCEL handling Jakub Pawlowski
2015-10-05 8:21 ` Johan Hedberg
2015-10-05 18:28 ` Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 4/8] tools/l2cap-tester: Disconnect during connect attempt test Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 5/8] tools/l2cap-tester: Two socket connect test Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 6/8] tools/l2cap-tester connect two sockets disconnect one test Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 7/8] emulator/hciemu: add second client Jakub Pawlowski
2015-09-02 17:51 ` [PATCH v3 8/8] tools/l2cap-tester: Connect to two devices test Jakub Pawlowski
2015-10-05 8:11 ` Johan Hedberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-04 13:20 [PATCH v3 1/8] emulator: add support for checking le scan state Jakub Pawlowski
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=20151005081135.GB632@t440s.lan \
--to=johan.hedberg@gmail.com \
--cc=jpawlowski@google.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 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).