On Mon, Mar 7, 2011 at 22:06, Shan Wei <shanwei@xxxxxxxxxxxxxx> wrote: > Use kcalloc or kzalloc rather than the combination of kmalloc and memset. [snip] > Signed-off-by: Shan Wei <shanwei@xxxxxxxxxxxxxx> > --- > drivers/net/wireless/mwl8k.c | 6 ++---- > 1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c > index df5959f..43776e6 100644 > --- a/drivers/net/wireless/mwl8k.c > +++ b/drivers/net/wireless/mwl8k.c > @@ -1056,13 +1056,12 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index) > } > memset(rxq->rxd, 0, size); > > - rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL); > + rxq->buf = kzalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL); Random nit, you're changing this from kmalloc to kzalloc when it would be trivial to change it to kcalloc instead if you don't restrict the T variable in your semantic patch to a type. Thanks, -- Julian Calaby Email: julian.calaby@xxxxxxxxx Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ -- 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