Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1222708

Re: [PATCH 1/5] staging: wilc1000: host_interface.c: replace WILC_MALLOC with kmalloc

From Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] staging: wilc1000: host_interface.c: replace WILC_MALLOC with kmalloc
Date 2015-09-11 13:00 +0200
Message-ID <q7udH-7KK-1@gated-at.bofh.it> (permalink)
References <q77h8-74B-21@gated-at.bofh.it> <q77h9-74B-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <mike.rapoport@gmail.com>
> ---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/5] staging: wilc1000: host_interface.c: replace WILC_MALLOC with kmalloc Mike Rapoport <mike.rapoport@gmail.com> - 2015-09-10 12:30 +0200
  Re: [PATCH 1/5] staging: wilc1000: host_interface.c: replace  WILC_MALLOC with kmalloc Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-11 13:00 +0200
  Re: [PATCH 1/5] staging: wilc1000: host_interface.c: replace  WILC_MALLOC with kmalloc Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-12 06:40 +0200

csiph-web