On Thu, Jul 23, 2015 at 08:19:17PM +0900, Chaehyun Lim wrote: > Use kmalloc and kmalloc_array instead of WILC_MALLOC. > > Signed-off-by: Chaehyun Lim <chaehyun.lim@xxxxxxxxx> > --- > drivers/staging/wilc1000/coreconfigurator.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c > index b069614..7e2b2ab41 100644 > --- a/drivers/staging/wilc1000/coreconfigurator.c > +++ b/drivers/staging/wilc1000/coreconfigurator.c > @@ -674,7 +674,7 @@ s32 CoreConfiguratorInit(void) > sema_init(&SemHandleSendPkt, 1); > sema_init(&SemHandlePktResp, 0); > > - gps8ConfigPacket = (s8 *)WILC_MALLOC(MAX_PACKET_BUFF_SIZE); > + gps8ConfigPacket = kmalloc(MAX_PACKET_BUFF_SIZE, GFP_ATOMIC); I know this is what WILC_MALLOC() did, but should this really be GFP_ATOMIC? > if (gps8ConfigPacket == NULL) { > PRINT_ER("failed in gps8ConfigPacket allocation\n"); > s32Error = WILC_NO_MEM; > @@ -811,7 +811,7 @@ s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) > u32 u32Tsf_Lo; > u32 u32Tsf_Hi; > > - pstrNetworkInfo = (tstrNetworkInfo *)WILC_MALLOC(sizeof(tstrNetworkInfo)); > + pstrNetworkInfo = kmalloc(sizeof(tstrNetworkInfo), GFP_ATOMIC); Same here. And everywhere else you changed this code, please review and resend. thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel