From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752862AbbIKK4K (ORCPT ); Fri, 11 Sep 2015 06:56:10 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33836 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbbIKK4I (ORCPT ); Fri, 11 Sep 2015 06:56:08 -0400 Date: Fri, 11 Sep 2015 16:25:57 +0530 From: Sudip Mukherjee To: Mike Rapoport Cc: Greg Kroah-Hartman , Johnny Kim , Rachel Kim , Chris Park , Tony Cho , Glen Lee , Leo Kim , LKML Subject: Re: [PATCH 1/5] staging: wilc1000: host_interface.c: replace WILC_MALLOC with kmalloc Message-ID: <20150911105557.GA16129@sudip-pc> References: <1441880877-3832-1-git-send-email-mike.rapoport@gmail.com> <1441880877-3832-2-git-send-email-mike.rapoport@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441880877-3832-2-git-send-email-mike.rapoport@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2015 at 01:27:53PM +0300, Mike Rapoport wrote: > WILC_MALLOC(size) is wrapping a call to kmalloc(size, GFP_ATOMIC) with a > check for 'size > 0', which kmalloc handles anyway > > The semantic patch that makes this change is as follows: > > @@ > expression v, s; > type t; > identifier i; > @@ > ( > - v = WILC_MALLOC(s); > + v = kmalloc(s, GFP_ATOMIC); > | > - t i = WILC_MALLOC(s); > + t i = kmalloc(s, GFP_ATOMIC); > ) > > Signed-off-by: Mike Rapoport > --- Have you checked if it will be GFP_ATOMIC or GFP_KERNEL? I think I can see many places where it will be GFP_KERNEL. regards sudip