linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: hci_qca: Remove redundant initializations to zero
@ 2019-08-07 18:58 Matthias Kaehlcke
  2019-08-12 17:06 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2019-08-07 18:58 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg
  Cc: linux-bluetooth, linux-kernel, Balakrishna Godavarthi,
	Rocky Liao, Harish Bandi, Matthias Kaehlcke

The qca_data structure is allocated with kzalloc() and hence
zero-initialized. Remove a bunch of unnecessary explicit
initializations of struct members to zero.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
---
just noticed that this patch fell through the cracks, resending a
rebased version.

Changes in v2:
- added 'Reviewed-by' tag from Balakrishna
- rebased on bluetooth-next/master

 drivers/bluetooth/hci_qca.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 16db6c00ae64..007e98c36e2f 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -499,26 +499,7 @@ static int qca_open(struct hci_uart *hu)
 	qca->tx_ibs_state = HCI_IBS_TX_ASLEEP;
 	qca->rx_ibs_state = HCI_IBS_RX_ASLEEP;
 
-	/* clocks actually on, but we start votes off */
-	qca->tx_vote = false;
-	qca->rx_vote = false;
-	qca->flags = 0;
-
-	qca->ibs_sent_wacks = 0;
-	qca->ibs_sent_slps = 0;
-	qca->ibs_sent_wakes = 0;
-	qca->ibs_recv_wacks = 0;
-	qca->ibs_recv_slps = 0;
-	qca->ibs_recv_wakes = 0;
 	qca->vote_last_jif = jiffies;
-	qca->vote_on_ms = 0;
-	qca->vote_off_ms = 0;
-	qca->votes_on = 0;
-	qca->votes_off = 0;
-	qca->tx_votes_on = 0;
-	qca->tx_votes_off = 0;
-	qca->rx_votes_on = 0;
-	qca->rx_votes_off = 0;
 
 	hu->priv = qca;
 
-- 
2.22.0.770.g0f2c4a37fd-goog


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

* Re: [PATCH v2] Bluetooth: hci_qca: Remove redundant initializations to zero
  2019-08-07 18:58 [PATCH v2] Bluetooth: hci_qca: Remove redundant initializations to zero Matthias Kaehlcke
@ 2019-08-12 17:06 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2019-08-12 17:06 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Johan Hedberg, linux-bluetooth, linux-kernel,
	Balakrishna Godavarthi, Rocky Liao, Harish Bandi

Hi Matthias,

> The qca_data structure is allocated with kzalloc() and hence
> zero-initialized. Remove a bunch of unnecessary explicit
> initializations of struct members to zero.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> Reviewed-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> ---
> just noticed that this patch fell through the cracks, resending a
> rebased version.
> 
> Changes in v2:
> - added 'Reviewed-by' tag from Balakrishna
> - rebased on bluetooth-next/master
> 
> drivers/bluetooth/hci_qca.c | 19 -------------------
> 1 file changed, 19 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, other threads:[~2019-08-12 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 18:58 [PATCH v2] Bluetooth: hci_qca: Remove redundant initializations to zero Matthias Kaehlcke
2019-08-12 17:06 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).