Skip to contentSkip to conversation

Bluetooth: Fix debug statement with double endian conversion

PATCH New Marcel Holtmann 1 participant 1 message Jun 19, 2020

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Fix debug statement with double endian conversion

The current_flags field is already in CPU endian and so no need to convert it again from little-endian.

---
 net/bluetooth/mgmt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/mgmt.c +1 -2
index 2a732cab1dc9..a27620ba7f3d 100644
@@ -3950,8 +3950,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);
 
 	if ((supported_flags | current_flags) != supported_flags) {
 		bt_dev_warn(hdev, "Bad flag given (0x%x) vs supported (0x%0x)",
Signature · 1 line
2.26.2