From: Dan Carpenter <dan.carpenter@oracle.com>
To: ytkim@qca.qualcomm.com
Cc: linux-bluetooth@vger.kernel.org
Subject: re: Bluetooth: hciuart: Add support QCA chipset for UART
Date: Thu, 13 Aug 2015 23:59:20 +0300 [thread overview]
Message-ID: <20150813205655.GA30361@mwanda> (raw)
Hello Ben Young Tae Kim,
The patch 0ff252c1976d: "Bluetooth: hciuart: Add support QCA chipset
for UART" from Aug 10, 2015, leads to the following static checker
warning:
drivers/bluetooth/hci_qca.c:485 qca_debugfs_init()
warn: passing casted pointer '&qca->tx_vote' to 'debugfs_create_bool()' 1 vs 32.
drivers/bluetooth/hci_qca.c
482 &qca->ibs_recv_wakes);
483 debugfs_create_u64("ibs_recv_wake_acks", mode, ibs_dir,
484 &qca->ibs_recv_wacks);
485 debugfs_create_bool("tx_vote", mode, ibs_dir, (u32 *)&qca->tx_vote);
debugfs_create_bool() is stupid, because the name says bool but it
writes a u32. I am not sure why this is. Maybe because the sizeof
_Bool is not defined in C? Anyway, this will not work and will also
corrupt memory.
486 debugfs_create_u64("tx_votes_on", mode, ibs_dir, &qca->tx_votes_on);
487 debugfs_create_u64("tx_votes_off", mode, ibs_dir, &qca->tx_votes_off);
488 debugfs_create_bool("rx_vote", mode, ibs_dir, (u32 *)&qca->rx_vote);
^^^^
Same.
489 debugfs_create_u64("rx_votes_on", mode, ibs_dir, &qca->rx_votes_on);
490 debugfs_create_u64("rx_votes_off", mode, ibs_dir, &qca->rx_votes_off);
regards,
dan carpenter
next reply other threads:[~2015-08-13 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 20:59 Dan Carpenter [this message]
2015-08-13 21:51 ` Bluetooth: hciuart: Add support QCA chipset for UART Ben Young Tae Kim
2015-08-13 21:59 ` Ben Young Tae Kim
2015-08-14 0:40 ` Dan Carpenter
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=20150813205655.GA30361@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=ytkim@qca.qualcomm.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 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.