public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: hci_event: Fix build warning with C=1
@ 2022-08-03 21:55 Luiz Augusto von Dentz
  2022-08-03 21:55 ` [PATCH 2/2] Bluetooth: MGMT: Fixes build warnings " Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2022-08-03 21:55 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes the following warning when build with make C=1:

net/bluetooth/hci_event.c:337:15: warning: restricted __le16 degrades to integer

Fixes: a93661203641e ("Bluetooth: Process result of HCI Delete Stored Link Key command")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_event.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 9ab359b15f57..395c6479456f 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -328,14 +328,17 @@ static u8 hci_cc_delete_stored_link_key(struct hci_dev *hdev, void *data,
 					struct sk_buff *skb)
 {
 	struct hci_rp_delete_stored_link_key *rp = data;
+	u16 num_keys;
 
 	bt_dev_dbg(hdev, "status 0x%2.2x", rp->status);
 
 	if (rp->status)
 		return rp->status;
 
-	if (rp->num_keys <= hdev->stored_num_keys)
-		hdev->stored_num_keys -= le16_to_cpu(rp->num_keys);
+	num_keys = le16_to_cpu(rp->num_keys);
+
+	if (num_keys <= hdev->stored_num_keys)
+		hdev->stored_num_keys -= num_keys;
 	else
 		hdev->stored_num_keys = 0;
 
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Bluetooth: MGMT: Fixes build warnings with C=1
  2022-08-03 21:55 [PATCH 1/2] Bluetooth: hci_event: Fix build warning with C=1 Luiz Augusto von Dentz
@ 2022-08-03 21:55 ` Luiz Augusto von Dentz
  2022-08-03 23:04 ` [1/2] Bluetooth: hci_event: Fix build warning " bluez.test.bot
  2022-08-04  0:00 ` [PATCH 1/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2022-08-03 21:55 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes the following warning when building with make C=1:

net/bluetooth/mgmt.c:3821:29: warning: restricted __le16 degrades to integer
net/bluetooth/mgmt.c:4625:9: warning: cast to restricted __le32

Fixes: 600a87490ff98 ("Bluetooth: Implementation of MGMT_OP_SET_BLOCKED_KEYS.")
Fixes: 4c54bf2b093bb ("Bluetooth: Add get/set device flags mgmt op")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/mgmt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 11eb6e538518..cf393d7c6e87 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3818,7 +3818,7 @@ static int set_blocked_keys(struct sock *sk, struct hci_dev *hdev, void *data,
 
 	hci_blocked_keys_clear(hdev);
 
-	for (i = 0; i < keys->key_count; ++i) {
+	for (i = 0; i < key_count; ++i) {
 		struct blocked_key *b = kzalloc(sizeof(*b), GFP_KERNEL);
 
 		if (!b) {
@@ -4623,8 +4623,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
 	u32 current_flags = __le32_to_cpu(cp->current_flags);
 
 	bt_dev_dbg(hdev, "Set device flags %pMR (type 0x%x) = 0x%x",
-		   &cp->addr.bdaddr, cp->addr.type,
-		   __le32_to_cpu(current_flags));
+		   &cp->addr.bdaddr, cp->addr.type, current_flags);
 
 	// We should take hci_dev_lock() early, I think.. conn_flags can change
 	supported_flags = hdev->conn_flags;
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [1/2] Bluetooth: hci_event: Fix build warning with C=1
  2022-08-03 21:55 [PATCH 1/2] Bluetooth: hci_event: Fix build warning with C=1 Luiz Augusto von Dentz
  2022-08-03 21:55 ` [PATCH 2/2] Bluetooth: MGMT: Fixes build warnings " Luiz Augusto von Dentz
@ 2022-08-03 23:04 ` bluez.test.bot
  2022-08-04  0:00 ` [PATCH 1/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2022-08-03 23:04 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=665193

---Test result---

Test Summary:
CheckPatch                    PASS      3.50 seconds
GitLint                       PASS      2.08 seconds
SubjectPrefix                 PASS      1.75 seconds
BuildKernel                   PASS      33.59 seconds
BuildKernel32                 PASS      29.33 seconds
Incremental Build with patchesPASS      48.03 seconds
TestRunner: Setup             PASS      476.72 seconds
TestRunner: l2cap-tester      PASS      16.95 seconds
TestRunner: bnep-tester       PASS      6.26 seconds
TestRunner: mgmt-tester       PASS      98.97 seconds
TestRunner: rfcomm-tester     PASS      9.69 seconds
TestRunner: sco-tester        PASS      9.33 seconds
TestRunner: smp-tester        PASS      9.41 seconds
TestRunner: userchan-tester   PASS      6.45 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Bluetooth: hci_event: Fix build warning with C=1
  2022-08-03 21:55 [PATCH 1/2] Bluetooth: hci_event: Fix build warning with C=1 Luiz Augusto von Dentz
  2022-08-03 21:55 ` [PATCH 2/2] Bluetooth: MGMT: Fixes build warnings " Luiz Augusto von Dentz
  2022-08-03 23:04 ` [1/2] Bluetooth: hci_event: Fix build warning " bluez.test.bot
@ 2022-08-04  0:00 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2022-08-04  0:00 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed,  3 Aug 2022 14:55:26 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This fixes the following warning when build with make C=1:
> 
> net/bluetooth/hci_event.c:337:15: warning: restricted __le16 degrades to integer
> 
> Fixes: a93661203641e ("Bluetooth: Process result of HCI Delete Stored Link Key command")
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> [...]

Here is the summary with links:
  - [1/2] Bluetooth: hci_event: Fix build warning with C=1
    https://git.kernel.org/bluetooth/bluetooth-next/c/72fe393b4e25
  - [2/2] Bluetooth: MGMT: Fixes build warnings with C=1
    https://git.kernel.org/bluetooth/bluetooth-next/c/9f74dd92c262

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-04  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-03 21:55 [PATCH 1/2] Bluetooth: hci_event: Fix build warning with C=1 Luiz Augusto von Dentz
2022-08-03 21:55 ` [PATCH 2/2] Bluetooth: MGMT: Fixes build warnings " Luiz Augusto von Dentz
2022-08-03 23:04 ` [1/2] Bluetooth: hci_event: Fix build warning " bluez.test.bot
2022-08-04  0:00 ` [PATCH 1/2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox