From: Joe Perches <joe@perches.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>,
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 08:24:43 -0700 [thread overview]
Message-ID: <1340983483.6562.31.camel@joe2Laptop> (raw)
In-Reply-To: <1340978200.4472.2.camel@jlt3.sipsolutions.net>
On Fri, 2012-06-29 at 15:56 +0200, Johannes Berg wrote:
> On Fri, 2012-06-29 at 06:26 -0700, Thomas Huehn wrote:
[]
> > diff --git 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);
trivia: this might be better as kcalloc
prev parent reply other threads:[~2012-06-29 15:24 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
2012-06-29 15:24 ` Joe Perches [this message]
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=1340983483.6562.31.camel@joe2Laptop \
--to=joe@perches.com \
--cc=franzschrober@yahoo.de \
--cc=johannes@sipsolutions.net \
--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).