From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Cc: linux-wireless@vger.kernel.org,
John Linville <linville@tuxdriver.com>,
franzschrober@yahoo.de, julian.calaby@gmail.com, nbd@openwrt.org
Subject: Re: [PATCH v2] mac80211: correct size the argument to kzalloc in minstrel_ht
Date: Fri, 29 Jun 2012 15:56:40 +0200 [thread overview]
Message-ID: <1340978200.4472.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1340976387-80206-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
On Fri, 2012-06-29 at 06:26 -0700, Thomas Huehn wrote:
> msp has type struct minstrel_ht_sta_priv not struct minstrel_ht_sta.
>
> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
I guess it worked anyway because the allocations are usually rounded up.
> ---
> Use suggested coding style. Thx to Schrober.
> ---
> net/mac80211/rc80211_minstrel_ht.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index 2d1acc6..1ca8f2b 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -809,11 +809,11 @@ minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
> max_rates = sband->n_bitrates;
> }
>
> - msp = kzalloc(sizeof(struct minstrel_ht_sta), gfp);
> + msp = kzalloc(sizeof(*msp), gfp);
> if (!msp)
> return NULL;
>
> - msp->ratelist = kzalloc(sizeof(struct minstrel_rate) * max_rates, gfp);
> + msp->ratelist = kzalloc(sizeof(*msp->ratelist) * max_rates, gfp);
> if (!msp->ratelist)
> goto error;
>
next prev parent reply other threads:[~2012-06-29 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 13:26 [PATCH v2] mac80211: correct size the argument to kzalloc in minstrel_ht Thomas Huehn
2012-06-29 13:56 ` Johannes Berg [this message]
2012-06-29 15:24 ` Joe Perches
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=1340978200.4472.2.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=franzschrober@yahoo.de \
--cc=julian.calaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=nbd@openwrt.org \
--cc=thomas@net.t-labs.tu-berlin.de \
/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).