Message ID | 1441640199-1507-4-git-send-email-chaehyun.lim@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
On 2015? 09? 08? 00:36, Chaehyun Lim wrote: > This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC. > It is inside the spin lock region. > > Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> > --- > drivers/staging/wilc1000/wilc_msgqueue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c > index 76d2e63..41244ce 100644 > --- a/drivers/staging/wilc1000/wilc_msgqueue.c > +++ b/drivers/staging/wilc1000/wilc_msgqueue.c > @@ -72,7 +72,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle, > WILC_NULLCHECK(s32RetStatus, pstrMessage); > pstrMessage->u32Length = u32SendBufferSize; > pstrMessage->pstrNext = NULL; > - pstrMessage->pvBuffer = WILC_MALLOC(u32SendBufferSize); > + pstrMessage->pvBuffer = kmalloc(u32SendBufferSize, GFP_ATOMIC); > WILC_NULLCHECK(s32RetStatus, pstrMessage->pvBuffer); > memcpy(pstrMessage->pvBuffer, pvSendBuffer, u32SendBufferSize); I want just to let you know this file will be soon changed. Thanks, Tony. > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Sep 08, 2015 at 11:23:07AM +0900, Tony Cho wrote: > > > On 2015? 09? 08? 00:36, Chaehyun Lim wrote: > >This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC. > >It is inside the spin lock region. > > > >Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> > >--- > > drivers/staging/wilc1000/wilc_msgqueue.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c > >index 76d2e63..41244ce 100644 > >--- a/drivers/staging/wilc1000/wilc_msgqueue.c > >+++ b/drivers/staging/wilc1000/wilc_msgqueue.c > >@@ -72,7 +72,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle, > > WILC_NULLCHECK(s32RetStatus, pstrMessage); > > pstrMessage->u32Length = u32SendBufferSize; > > pstrMessage->pstrNext = NULL; > >- pstrMessage->pvBuffer = WILC_MALLOC(u32SendBufferSize); > >+ pstrMessage->pvBuffer = kmalloc(u32SendBufferSize, GFP_ATOMIC); > > WILC_NULLCHECK(s32RetStatus, pstrMessage->pvBuffer); > > memcpy(pstrMessage->pvBuffer, pvSendBuffer, u32SendBufferSize); > > I want just to let you know this file will be soon changed. That doesn't matter, the first one to submit a change goes "first", everything that comes afterward needs to deal with that. We never tell someone that a patch isn't ok just because at some time in the future something else might change. That drives away developers and was one of the primary reasons other open source kernels have failed in the past. greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Sep 08, 2015 at 12:36:38AM +0900, Chaehyun Lim wrote: > This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC. > It is inside the spin lock region. > > Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> > --- Its not related to your patch, but while seeing your patch I thought of checking how WILC_NULLCHECK is working. Well, WILC_NULLCHECK is simple, its just checking for NULL and calling WILC_ERRORREPORT. WILC_ERRORREPORT is also simple, it is printing the error and then goto ERRORHANDLER; Ok, so now there are total 3 ERRORHANDLER label, one in wilc_errorsupport.h, there this label is the part of WILC_CATCH macro, and 2 more ERRORHANDLER in coreconfigurator.c. So it jumps to which ERRORHANDLER ??? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index 76d2e63..41244ce 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -72,7 +72,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle, WILC_NULLCHECK(s32RetStatus, pstrMessage); pstrMessage->u32Length = u32SendBufferSize; pstrMessage->pstrNext = NULL; - pstrMessage->pvBuffer = WILC_MALLOC(u32SendBufferSize); + pstrMessage->pvBuffer = kmalloc(u32SendBufferSize, GFP_ATOMIC); WILC_NULLCHECK(s32RetStatus, pstrMessage->pvBuffer); memcpy(pstrMessage->pvBuffer, pvSendBuffer, u32SendBufferSize);
This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC. It is inside the spin lock region. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> --- drivers/staging/wilc1000/wilc_msgqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)