diff mbox series

[1/2] Bluetooth: hci_event: Fix build warning with C=1

Message ID 20220803215527.3070932-1-luiz.dentz@gmail.com
State New
Headers show
Series [1/2] Bluetooth: hci_event: Fix build warning with C=1 | expand

Commit Message

Luiz Augusto von Dentz Aug. 3, 2022, 9:55 p.m. UTC
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(-)

Comments

bluez.test.bot@gmail.com Aug. 3, 2022, 11:04 p.m. UTC | #1
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
patchwork-bot+bluetooth@kernel.org Aug. 4, 2022, midnight UTC | #2
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!
diff mbox series

Patch

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;