Search Linux Wireless

Re: [PATCH] mac80211: correct size the argument to kzalloc in minstrel_ht

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Julian,

Compiler wise both of our suggestions will lead to the same machine code.
So beside the matter of taste, I just followed the other overall usage
pattern of kzalloc in minstrel_ht.
And it seems to be explicitly using the struct type.

Bye Thomas

Julian Calaby schrieb:
> Hi Thomas,
>
> On Fri, Jun 29, 2012 at 9:28 AM, Thomas Huehn
> <thomas@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>> msp has type struct minstrel_ht_sta_priv not struct minstrel_ht_sta.
>>
>> Signed-off-by: Thomas Huehn <thomas@xxxxxxxxxxxxxxxxxxxxxxx>
>> ---
>>  net/mac80211/rc80211_minstrel_ht.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
>> index 2d1acc6..dc2b801 100644
>> --- a/net/mac80211/rc80211_minstrel_ht.c
>> +++ b/net/mac80211/rc80211_minstrel_ht.c
>> @@ -809,7 +809,7 @@ 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(struct minstrel_ht_sta_priv), gfp);
>
> Why not use sizeof(*msp)?
>
> Thanks,
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux