Skip to content

Commit 965995b

Browse files
YueHaibingholtmann
authored andcommitted
Bluetooth: L2CAP: remove set but not used variable 'credits'
net/bluetooth/l2cap_core.c: In function l2cap_ecred_conn_req: net/bluetooth/l2cap_core.c:5848:6: warning: variable credits set but not used [-Wunused-but-set-variable] commit 15f02b9 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode") involved this unused variable, remove it. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent b354e6c commit 965995b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎net/bluetooth/l2cap_core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5845,7 +5845,7 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn,
58455845
__le16 dcid[5];
58465846
} __packed pdu;
58475847
struct l2cap_chan *chan, *pchan;
5848-
u16 credits, mtu, mps;
5848+
u16 mtu, mps;
58495849
__le16 psm;
58505850
u8 result, len = 0;
58515851
int i, num_scid;
@@ -5868,7 +5868,6 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn,
58685868
}
58695869

58705870
psm = req->psm;
5871-
credits = 0;
58725871

58735872
BT_DBG("psm 0x%2.2x mtu %u mps %u", __le16_to_cpu(psm), mtu, mps);
58745873

0 commit comments

Comments
 (0)