From: Marcel Holtmann <marcel@holtmann.org>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Remove unneeded zero init
Date: Thu, 30 Aug 2012 08:06:35 -0700 [thread overview]
Message-ID: <1346339195.23377.8.camel@aeonflux> (raw)
In-Reply-To: <1346317467-20903-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
> hdev is allocated with kzalloc so zero initialization is not needed.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> include/net/bluetooth/hci_core.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index 36720f0..05bcea6 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -443,10 +443,8 @@ static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
> static inline void hci_conn_hash_init(struct hci_dev *hdev)
> {
> struct hci_conn_hash *h = &hdev->conn_hash;
> +
> INIT_LIST_HEAD(&h->list);
> - h->acl_num = 0;
> - h->sco_num = 0;
> - h->le_num = 0;
> }
since there is only one user of hci_conn_hash_init, we should just
replace that call with a direct INIT_LIST_HEAD.
Regards
Marcel
next prev parent reply other threads:[~2012-08-30 15:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 9:04 [PATCH] Bluetooth: Remove unneeded zero init Andrei Emeltchenko
2012-08-30 15:06 ` Marcel Holtmann [this message]
2012-08-31 13:39 ` [PATCHv2] " Andrei Emeltchenko
2012-08-31 16:20 ` Marcel Holtmann
2012-08-31 17:55 ` Gustavo Padovan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346339195.23377.8.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=Andrei.Emeltchenko.news@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).